/* ============================================================
   MODAL STYLES - Slideover Modal System
   ============================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    justify-content: flex-end;
    align-items: flex-start;
}

.modal-overlay.active {
    display: flex !important;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.modal-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 560px;
    height: 100%;
    background: #fafcfa;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
}

.modal-container.slideover-right.active {
    transform: translateX(0);
}

.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid #eef3ea;
    background: white;
    flex-shrink: 0;
}

.modal-header-left {
    display: flex;
    gap: 14px;
    flex: 1;
}

.modal-close-btn {
    background: #f0f5ee;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a2c1a;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 2px;
}

.modal-close-btn:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

.modal-title-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a2c1a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.modal-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 0.85rem;
    color: #6e8b6e;
    margin: 0;
}

.modal-event-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-event-meta i {
    color: var(--mt-green);
    font-size: 0.8rem;
    width: 16px;
}

.modal-header-right {
    flex-shrink: 0;
    margin-top: 2px;
}

.event-status-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-status-badge.available {
    background: #d4edda;
    color: #155724;
}

.event-status-badge.limited {
    background: #fff3cd;
    color: #856404;
}

.event-status-badge.sold-out {
    background: #f8d7da;
    color: #721c24;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px 24px;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f0f5ee;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--mt-green);
    border-radius: 3px;
}

.modal-event-summary {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eef3ea;
}

.modal-event-image-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f5ee;
}

.modal-event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-event-description {
    flex: 1;
    min-width: 0;
}

.modal-event-description h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a2c1a;
    margin: 0 0 4px 0;
}

.modal-event-description p {
    font-size: 0.9rem;
    color: #5e7a5e;
    line-height: 1.5;
    margin: 0;
}

.modal-ticket-section {
    padding: 20px 0;
    border-bottom: 1px solid #eef3ea;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a2c1a;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--mt-green);
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8faf8;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.ticket-item:hover {
    border-color: #dce8da;
}

.ticket-item.selected {
    border-color: var(--mt-green);
    background: #f0f8ee;
}

.ticket-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ticket-item.disabled .ticket-quantity {
    pointer-events: none;
}

.ticket-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a2c1a;
}

.ticket-price {
    font-size: 0.85rem;
    color: var(--mt-green);
    font-weight: 700;
}

.ticket-price .currency {
    font-weight: 400;
    color: #6e8b6e;
}

.ticket-availability {
    font-size: 0.75rem;
    color: #6e8b6e;
}

.ticket-status.sold-out {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8d7da;
    color: #721c24;
}

.ticket-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-quantity button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #dce8da;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2c1a;
    transition: all 0.2s;
}

.ticket-quantity button:hover:not(:disabled) {
    border-color: var(--mt-green);
    background: var(--mt-green);
    color: white;
}

.ticket-quantity button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ticket-quantity .quantity-display {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.modal-order-summary {
    padding: 20px 0;
    border-bottom: 1px solid #eef3ea;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #1a2c1a;
}

.order-item .item-name {
    color: #5e7a5e;
}

.order-item .item-price {
    font-weight: 600;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 2px solid #eef3ea;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2c1a;
}

.order-total-price {
    color: var(--mt-green);
}

.modal-customer-form {
    padding: 20px 0;
}

.modal-customer-form .form-group {
    margin-bottom: 14px;
}

.modal-customer-form .form-group:last-child {
    margin-bottom: 0;
}

.modal-customer-form label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a2c1a;
    margin-bottom: 4px;
}

.modal-customer-form input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #eef3ea;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8faf8;
}

.modal-customer-form input:focus {
    outline: none;
    border-color: var(--mt-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(53, 168, 57, 0.1);
}

.modal-customer-form input.error {
    border-color: #e74c3c;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid #eef3ea;
    background: white;
    flex-shrink: 0;
}

.modal-footer-left .selected-count {
    font-size: 0.9rem;
    color: #6e8b6e;
    font-weight: 500;
}

.modal-footer-right {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    padding: 10px 24px;
    border: 2px solid #eef3ea;
    border-radius: 40px;
    background: transparent;
    font-weight: 600;
    font-size: 0.9rem;
    color: #6e8b6e;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f0f5ee;
    border-color: #dce8da;
}

.btn-primary {
    padding: 10px 28px;
    border: none;
    border-radius: 40px;
    background: var(--mt-green);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--mt-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(53, 168, 57, 0.3);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-primary i {
    transition: transform 0.2s;
}

.btn-primary:hover:not(:disabled) i {
    transform: translateX(4px);
}

.ticket-loading {
    text-align: center;
    padding: 40px 0;
    color: #6e8b6e;
}

.ticket-loading .spinner-small {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--mt-green);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

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

@media (max-width: 640px) {
    .modal-container {
        max-width: 100%;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 0 16px 16px 16px;
    }

    .modal-event-summary {
        flex-direction: column;
        gap: 12px;
    }

    .modal-event-image-wrapper {
        width: 100%;
        height: 120px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .modal-footer-right {
        width: 100%;
    }

    .modal-footer-right .btn-secondary,
    .modal-footer-right .btn-primary {
        flex: 1;
        justify-content: center;
    }

    .ticket-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ticket-quantity {
        margin-left: auto;
    }

    .modal-title-section h2 {
        font-size: 1.05rem;
    }

    
}