/* VESKA - Modal Windows */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(39, 39, 42, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--light-color);
    border-radius: 30px;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--primary-color);
}

.modal-close:before,
.modal-close:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: var(--dark-color);
}

.modal-close:before {
    transform: rotate(45deg);
}

.modal-close:after {
    transform: rotate(-45deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    color: var(--secondary-color);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.modal-description {
    color: var(--dark-color);
    opacity: 0.8;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.form-input {
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(61, 94, 140, 0.2);
}

.form-error {
    color: #e53935;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    min-height: 1rem;
}

.form-input.error {
    border-color: #e53935;
}

.form-submit {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    border-radius: 15px;
    padding: 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.form-submit:hover {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

/* Loading spinner */
.modal-loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
    width: 100%;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-message {
    text-align: center;
    padding: 2rem;
    display: none;
}

.modal-message.success {
    display: block;
}

.modal-message.error {
    display: block;
    color: #e53935;
}

@media (max-width: 576px) {
    .modal-container {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
}

/* Added styles for Checkout Modal */
.checkout-modal-container .modal-body {
    /* Add specific padding if different from generic modal-body */
}

.checkout-items-summary-class ul.checkout-item-list {
    list-style: none;
    padding: 0;
    max-height: 200px; /* Or your preferred height */
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--light-gray, #eee); /* Use CSS variable or fallback */
    padding: 0.75rem;
    border-radius: var(--border-radius, 15px); /* Assuming you have a border-radius var or use a value */
}

.checkout-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--light-gray, #f0f0f0);
}
.checkout-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkout-item-image {
    width: 60px;  /* Slightly larger than previous thought */
    height: 60px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: var(--border-radius-small, 8px); /* Example, adjust as needed */
    border: 1px solid var(--light-gray, #eee);
}

.checkout-item-details {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Align items nicely */
    gap: 0.5rem; /* Space between name and price if they wrap */
}
.checkout-item-name {
    font-size: 0.95em; /* Adjusted for clarity */
    color: var(--dark-color, #333);
    flex-basis: 70%; /* Give more space to name */
}
.checkout-item-price {
    font-size: 0.95em;
    font-weight: 600; /* Bold price */
    color: var(--primary-color, #3d5e8c);
    white-space: nowrap;
    flex-basis: 30%;
    text-align: right;
}

.checkout-total-summary-class {
    text-align: right;
    font-size: 1.3em; /* Larger total */
    font-weight: bold;
    margin: 1rem 0 1.5rem 0;
    color: var(--secondary-color, #333);
}

.checkout-contact-title {
    font-size: 1.2rem; /* Title for contact info section */
    color: var(--secondary-color, #333);
    margin-bottom: 1rem;
    text-align: left; /* Align with form */
    border-top: 1px solid var(--light-gray, #eee);
    padding-top: 1rem;
}

/* Ensure submit button has consistent styling if not already covered by .form-submit */
.btn-submit-order {
    /* Styles from .form-submit are likely applied, add specifics if needed */
    /* e.g., width: 100%; if not already full width via .form-submit */
}

/* Thank you message specific styling if needed beyond .modal-message */
#checkout-view-thank-you .modal-title {
    color: var(--success-color, #27ae60); /* Use a success color variable or fallback */
}

#checkout-view-thank-you #close-thank-you-btn {
    margin-top: 1rem;
    /* width: auto; /* If you want it smaller than full-width */ 
    /* display: inline-block; */
}

/* Ensure modal is scrollable if content overflows, especially on smaller screens */
.checkout-modal-container {
    max-height: 90vh; /* Max height relative to viewport */
    overflow-y: auto; /* Allow internal scrolling if content exceeds max-height */
} 