/* === FLAVOR EDITOR MODAL STYLES === */

#flavor-editor-modal-backdrop { 
    background-color: transparent; 
    backdrop-filter: none; 
    -webkit-backdrop-filter: none; 
    align-items: center; 
    padding-top: 0; 
    z-index: calc(var(--z-modal-backdrop) + 200); 
}

#flavor-editor-modal-backdrop .modal-content { 
    background: rgba(255, 255, 255, 0.25); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    border-radius: 20px; 
    padding: 25px 35px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.25); 
    width: 90%; 
    max-width: 900px; 
    transform: scale(0.95) translateY(10px); 
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease-out; 
    max-height: 90vh; 
    overflow-y: auto; 
    position: relative; 
    z-index: calc(var(--z-modal-content) + 200);
}

#flavor-editor-modal-backdrop .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 1600px 1200px at -500px -350px, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.05) 80%, transparent 100%);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

#flavor-editor-modal-backdrop.hidden .modal-content { 
    transform: scale(0.95) translateY(10px); 
}

#flavor-editor-modal-backdrop:not(.hidden) .modal-content { 
    transform: scale(1) translateY(0); 
}

#flavor-editor-modal-backdrop .modal-header { 
    padding: 0; 
    border: none; 
    margin-bottom: 8px; 
    text-align: center; 
    position: relative; 
    z-index: 10; 
}

#flavor-editor-modal-backdrop h2 { 
    font-size: 1.75rem; 
    font-weight: 700; 
    color: #1d1d1f; 
    line-height: 1.2; 
    width: 100%; 
    position: relative; 
    z-index: 10; 
}

#flavor-editor-modal-backdrop .modal-body { 
    padding: 0; 
    position: relative; 
    z-index: 10; 
}

#flavor-editor-modal-backdrop .modal-subtitle { 
    font-size: 0.95rem; 
    color: #3c3c43; 
    opacity: 0.9; 
    margin-top: 0; 
    margin-bottom: 20px; 
    position: relative; 
    z-index: 10; 
}

#flavor-editor-modal-backdrop .modal-close-btn { 
    position: absolute; 
    z-index: 10; 
}

/* Enhanced Apple-sequel form styles for flavor editor */
#flavor-editor-modal-backdrop .form-group { 
    margin-bottom: 1rem; 
}

#flavor-editor-modal-backdrop .form-label { 
    display: block; 
    font-size: 0.875rem; 
    font-weight: 500; 
    color: #1d1d1f; 
    margin-bottom: 0.5rem; 
}

#flavor-editor-modal-backdrop .form-input, 
#flavor-editor-modal-backdrop .form-textarea, 
#flavor-editor-modal-backdrop .form-select { 
    width: 100%; 
    padding: 12px 16px; 
    border-radius: 10px; 
    font-size: 0.95rem; 
    color: #1d1d1f; 
    background-color: #f7f7f8; 
    border: 1px solid rgba(170, 170, 180, 0.4); 
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; 
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none; 
}

#flavor-editor-modal-backdrop .form-select { 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E"); 
    background-repeat: no-repeat; 
    background-position: right 0.75rem center; 
    background-size: 1.25em 1.25em; 
    padding-right: 2.5rem; 
}

#flavor-editor-modal-backdrop .form-input::placeholder, 
#flavor-editor-modal-backdrop .form-textarea::placeholder { 
    color: rgba(60, 60, 67, 0.6); 
}

#flavor-editor-modal-backdrop .form-input:focus, 
#flavor-editor-modal-backdrop .form-textarea:focus, 
#flavor-editor-modal-backdrop .form-select:focus { 
    outline: none; 
    border-color: #007aff; 
    background-color: rgba(255, 255, 255, 0.5); 
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2); 
}

#flavor-editor-modal-backdrop .form-helper-text { 
    font-size: 0.8rem; 
    color: #6e6e73; 
    margin-top: 0.4rem; 
    padding-left: 2px; 
}

/* Enhanced modal buttons for flavor editor */
#flavor-editor-modal-backdrop .btn { 
    padding: 10px 20px; 
    border-radius: 8px; 
    font-weight: 500; 
    font-size: 0.95rem; 
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease; 
}

#flavor-editor-modal-backdrop .btn-primary { 
    background-color: #007aff; 
    color: white; 
    border: none; 
}

#flavor-editor-modal-backdrop .btn-primary:hover { 
    background-color: #005ecb; 
}

#flavor-editor-modal-backdrop .btn-secondary { 
    background-color: transparent; 
    color: #007aff; 
    font-weight: 500; 
    box-shadow: none; 
    border: none; 
}

#flavor-editor-modal-backdrop .btn-secondary:hover { 
    background-color: rgba(0, 122, 255, 0.08); 
}

#flavor-editor-modal-backdrop .btn:active { 
    transform: translateY(1px) scale(0.98); 
}

/* Modal close button styling */
.modal-close-btn { 
    position: absolute; 
    top: 18px; 
    right: 18px; 
    background: none; 
    border: none; 
    font-size: 1.9rem; 
    color: rgba(60, 60, 67, 0.5); 
    cursor: pointer; 
    padding: 5px; 
    line-height: 1; 
    transition: color 0.2s ease, transform 0.2s ease; 
    user-select: none; 
}

.modal-close-btn:hover { 
    color: rgba(60, 60, 67, 0.8); 
    transform: scale(1.1); 
}

.modal-header .modal-close-btn {
    position: static;
    top: auto;
    right: auto;
    margin-left: var(--space-3);
}

/* Modal subtitle styling */
#flavor-editor-modal-backdrop .modal-subtitle { 
    font-size: 0.95rem; 
    color: #3c3c43; 
    opacity: 0.9; 
    margin-top: 0; 
    margin-bottom: 20px; 
} 