/* 
 * Salon Modal CSS
 * Picasso Beauty Salon - Modal Functionality Styles
 */

/* ===== MODAL BASE STYLES ===== */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 999999;
    display: none;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.fullscreen-modal.show {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* ===== MODAL BACKDROP ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.modal-backdrop.show {
    display: block;
    opacity: 1;
}

/* ===== BODY MODAL STATE ===== */
.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

/* ===== MODAL HEADER ===== */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.modal-header h2 {
    font-family: "orpheuspro", serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0;
    text-align: center;
    letter-spacing: 1px;
    flex: 1;
}

.modal-header h2 span {
    display: block;
    font-size: 1.2rem;
    margin-top: 5px;
    opacity: 0.9;
    font-style: italic;
}

/* ===== CLOSE BUTTON ===== */
.close-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.close-button:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ===== MODAL CONTENT ===== */
.modal-content {
    height: calc(100vh - 80px);
    overflow-y: auto;
    background: #fafafa;
    padding: 3rem 4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    position: relative;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 100%;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MENU SECTIONS ===== */
.menu-section {
    width: 48%;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.menu-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.menu-section h3 {
    font-family: "orpheuspro", serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    text-align: center;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 1rem;
}

/* ===== MENU ITEMS ===== */
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.menu-item:last-child {
    border-bottom: none;
    /* padding-bottom: 0; */
}

.menu-item:hover {
    background: rgba(169, 151, 109, 0.03);
    transform: translateX(5px);
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 8px;
}

.menu-item-info {
    flex: 1;
    padding-right: 2rem;
}

.menu-item-info h4 {
    font-family: "orpheuspro", serif;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
    line-height: 1.4;
    letter-spacing: 0.5px;
}

.menu-item-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

/* ===== MENU PRICING ===== */
.menu-price {
    font-family: "orpheuspro", serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #C43357;
    white-space: nowrap;
    position: relative;
    min-width: 80px;
    text-align: right;
}

.menu-price::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-item:hover .menu-price::before {
    opacity: 1;
}

/* ===== ERROR STATES ===== */
.menu-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: white;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    width: 100%;
}

.menu-error i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1.5rem;
}

.menu-error h3 {
    font-size: 1.5rem;
    color: #e74c3c;
    margin-bottom: 1rem;
    font-family: "orpheuspro", serif;
}

.menu-error p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===== MODAL BUTTONS ===== */
.menu-modal-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(51, 51, 51, 0.2);
}

.menu-modal-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(169, 151, 109, 0.3);
}

.menu-modal-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== MODAL FOOTER ===== */
.modal-footer {
    background: white;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: auto;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.menu-section {
    animation: fadeInScale 0.6s ease forwards;
}

.menu-section:nth-child(1) { animation-delay: 0.1s; }
.menu-section:nth-child(2) { animation-delay: 0.2s; }
.menu-section:nth-child(3) { animation-delay: 0.3s; }
.menu-section:nth-child(4) { animation-delay: 0.4s; }

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 1200px) {
    .modal-content {
        padding: 2rem 3rem;
    }
    
    .menu-section {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .modal-header {
        padding: 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-header h2 span {
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        height: calc(100vh - 70px);
    }
    
    .menu-section {
        width: 100%;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .menu-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .menu-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .menu-item:hover {
        transform: none;
        padding: 1rem;
    }
    
    .menu-item-info {
        padding-right: 0;
    }
    
    .menu-item-info h4 {
        font-size: 1rem;
    }
    
    .menu-item-info p {
        font-size: 0.85rem;
    }
    
    .menu-price {
        align-self: flex-end;
        min-width: auto;
        font-size: 1.1rem;
    }
    
    .menu-price::before {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .modal-header {
        padding: 15px 10px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .menu-section {
        padding: 1rem;
    }
    
    .menu-section h3 {
        font-size: 1.1rem;
    }
    
    .loading-spinner i {
        font-size: 2rem;
    }
    
    .loading-spinner p {
        font-size: 1rem;
    }
    
    .menu-error {
        padding: 2rem 1rem;
        height: 250px;
    }
    
    .menu-error i {
        font-size: 2rem;
    }
    
    .menu-error h3 {
        font-size: 1.2rem;
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .fullscreen-modal,
    .menu-section,
    .menu-item,
    .loading-spinner i {
        animation: none;
        transition: none;
    }
    
    .menu-item:hover {
        transform: none;
    }
    
    .close-button:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .modal-header {
        background: #000;
        border-bottom: 2px solid #fff;
    }
    
    .menu-section {
        border: 2px solid #000;
    }
    
    .menu-item {
        border-bottom: 2px solid #000;
    }
    
    .menu-price {
        color: #000;
        font-weight: 700;
    }
}

/* ===== FOCUS MANAGEMENT ===== */
.modal-content:focus {
    outline: none;
}

.menu-section:focus-within {
    box-shadow: 0 0 0 3px rgba(169, 151, 109, 0.3);
}

.menu-item:focus-within {
    background: rgba(169, 151, 109, 0.1);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .fullscreen-modal {
        position: static;
        width: 100%;
        height: auto;
        background: white;
        display: block !important;
        opacity: 1;
        transform: none;
    }
    
    .modal-header {
        background: white;
        color: black;
        border-bottom: 2px solid black;
    }
    
    .modal-content {
        height: auto;
        padding: 1rem;
        background: white;
    }
    
    .menu-section {
        width: 100%;
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid black;
    }
    
    .close-button,
    .menu-modal-btn {
        display: none;
    }
}