/* =========================================
   F-BRAND POST MODAL STYLES
   Works with Aristotle Bootstrap theme
   ========================================= */

/* Brand Post Header in Modal */
#createBrandPost .brand-post-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Avatar - VERY AGGRESSIVE circle styling */
#createBrandPost .brand-post-avatar,
#createBrandPost #bp-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #0a66c2, #004182) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

#createBrandPost .brand-post-avatar img,
#createBrandPost #bp-avatar img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

#createBrandPost .avatar-initial {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

/* Brand Info */
#createBrandPost .brand-post-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

#createBrandPost .brand-post-name,
#createBrandPost #bp-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.2 !important;
    display: block !important;
}

#createBrandPost .brand-post-visibility {
    font-size: 12px !important;
    color: #666 !important;
    font-weight: 400 !important;
    display: block !important;
}

/* Media Preview */
#createBrandPost .bp-media-preview {
    margin-bottom: 15px !important;
    padding: 10px !important;
    background: #f5f5f5 !important;
    border-radius: 8px !important;
}

#createBrandPost .bp-media-preview .preview-item {
    position: relative !important;
    display: inline-block !important;
}

#createBrandPost .bp-media-preview .preview-item img {
    max-width: 100% !important;
    max-height: 200px !important;
    border-radius: 8px !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
}

#createBrandPost .bp-media-preview .video-preview {
    padding: 15px !important;
    background: #fff !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
}

#createBrandPost .bp-media-preview .remove-preview {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 24px !important;
    height: 24px !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.6) !important;
    color: #fff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

/* Textarea in Modal */
#createBrandPost .form-textarea {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 20px !important;
    resize: none !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    min-height: 100px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#createBrandPost .form-textarea:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.2) !important;
    border-color: #0a66c2 !important;
}

#createBrandPost .form-textarea::placeholder {
    color: #888 !important;
}

/* Action Buttons Row */
#createBrandPost .brand-post-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 15px 0 !important;
    border-top: 1px solid #e0e0e0 !important;
    margin-bottom: 15px !important;
}

#createBrandPost .bp-action-btn {
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: #f5f5f5 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
}

#createBrandPost .bp-action-btn:hover {
    background: #e8e8e8 !important;
    transform: scale(1.05) !important;
}

#createBrandPost .bp-action-btn:active {
    transform: scale(0.95) !important;
}

#createBrandPost .bp-action-btn svg {
    width: 24px !important;
    height: 24px !important;
    pointer-events: none !important;
}

/* Submit Button */
#createBrandPost .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    padding-top: 10px !important;
}

#createBrandPost .form-submit,
#createBrandPost #bp-submit {
    background: linear-gradient(180deg, #0a66c2, #004182) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 24px !important;
    padding: 10px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3) !important;
}

#createBrandPost .form-submit:hover,
#createBrandPost #bp-submit:hover {
    background: linear-gradient(180deg, #004182, #00264d) !important;
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.4) !important;
}

#createBrandPost .form-submit:disabled,
#createBrandPost #bp-submit:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Modal Overrides */
#createBrandPost .modal-header {
    justify-content: space-between !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding-bottom: 15px !important;
}

#createBrandPost .modal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

#createBrandPost .close {
    position: static !important;
    font-size: 28px !important;
    opacity: 0.6 !important;
}

#createBrandPost .close:hover {
    opacity: 1 !important;
}

#createBrandPost .modal-body {
    padding-top: 20px !important;
}

/* Hide any Drupal form elements that might leak through */
#createBrandPost .form-item>label,
#createBrandPost .description {
    display: none !important;
}

/* =========================================
   FASHION EVENT FORM STYLES
   ========================================= */
#createBrandPost .bp-event-form {
    background: linear-gradient(135deg, #faf8ff 0%, #fff5f5 100%);
    border: 1px solid #e8d8e8;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

#createBrandPost .bp-event-form .event-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8d8e8;
}

#createBrandPost .bp-event-form .event-icon {
    font-size: 24px;
}

#createBrandPost .bp-event-form h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cover Image Upload */
#createBrandPost .event-cover-upload {
    width: 100%;
    min-height: 120px;
    border: 2px dashed #d1c4e9;
    border-radius: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

#createBrandPost .event-cover-upload:hover {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.05);
}

#createBrandPost .event-cover-upload .cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    text-align: center;
}

#createBrandPost .event-cover-upload .cover-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

#createBrandPost .event-cover-upload .cover-text {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

#createBrandPost .event-cover-upload .cover-hint {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

#createBrandPost .event-cover-upload.has-image .cover-placeholder {
    display: none;
}

#createBrandPost .event-cover-upload img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* Event Fields */
#createBrandPost .bp-event-form .event-field {
    margin-bottom: 14px;
}

#createBrandPost .bp-event-form .event-field.half {
    flex: 1;
}

#createBrandPost .bp-event-form .event-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

#createBrandPost .bp-event-form label {
    display: block !important;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#createBrandPost .bp-event-form input[type="text"],
#createBrandPost .bp-event-form input[type="datetime-local"],
#createBrandPost .bp-event-form input[type="date"],
#createBrandPost .bp-event-form input[type="time"],
#createBrandPost .bp-event-form select,
#createBrandPost .bp-event-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0d8e8;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s;
    font-family: inherit;
}

#createBrandPost .bp-event-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

#createBrandPost .bp-event-form textarea {
    resize: vertical;
    min-height: 60px;
}

#createBrandPost .bp-event-form input:focus,
#createBrandPost .bp-event-form select:focus,
#createBrandPost .bp-event-form textarea:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

#createBrandPost .bp-cancel-event {
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

#createBrandPost .bp-cancel-event:hover {
    background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
    color: #333;
}

#createBrandPost .bp-event-btn.active {
    background: linear-gradient(135deg, #fef3e2, #fce7f3) !important;
    border-radius: 8px;
}

/* =========================================
   VIDEO PREVIEW STYLES
   ========================================= */
#createBrandPost .bp-media-preview .video-preview {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
}

#createBrandPost .bp-media-preview .video-preview video {
    display: block;
    width: 100%;
    max-height: 250px;
    border-radius: 12px;
}

#createBrandPost .bp-media-preview .video-info {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* =========================================
   DOCUMENT PREVIEW STYLES
   ========================================= */
#createBrandPost .bp-media-preview .doc-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
}

#createBrandPost .bp-media-preview .doc-icon {
    font-size: 32px;
}

#createBrandPost .bp-media-preview .doc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

#createBrandPost .bp-media-preview .doc-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

#createBrandPost .bp-media-preview .doc-size {
    font-size: 12px;
    color: #888;
}

/* Preview remove button adjustments */
#createBrandPost .bp-media-preview .video-preview .remove-preview,
#createBrandPost .bp-media-preview .doc-preview .remove-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 18px;
}

#createBrandPost .bp-media-preview .doc-preview .remove-preview {
    position: static;
    background: #f0f0f0;
    color: #666;
    margin-left: auto;
}

#createBrandPost .bp-media-preview .doc-preview .remove-preview:hover {
    background: #e0e0e0;
}