/* Modal styles for quantity selection */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    animation: slideDown 0.3s ease;
    position: relative;
}

.modal-form {
    display: contents;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    color: #2c3e50;
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #ecf0f1;
    text-align: center;
}

.modal-header h2 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.modal-price {
    font-size: 1.2rem;
    color: #27ae60;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 2rem;
}

.modal-body label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.modal-quantity {
    justify-content: center;
    margin-bottom: 1rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 1rem;
}

.btn-modal-cancel {
    flex: 1;
    padding: 0.85rem;
    background-color: #ecf0f1;
    color: #2c3e50;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-modal-cancel:hover {
    background-color: #d5dbdb;
}

.btn-modal-add {
    flex: 1;
    padding: 0.85rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-modal-add:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

.btn-modal-add.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 90%;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }

    .btn-modal-cancel,
    .btn-modal-add {
        width: 100%;
    }
}
