/**
 * Frontend CSS for Courtyard YITH Deposits Integration
 * Theater-themed styling with gold and dark colors
 */

/* Event Page Deposit Information Styling */
.ticket-deposit-info {
    margin-top: 20px !important;
    padding: 20px !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-left: 4px solid #d4af37 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.ticket-deposit-info p {
    margin: 0 0 15px 0 !important;
    color: #ffffff !important;
    font-size: 16px !important;
}

.ticket-deposit-info .pricing-breakdown {
    display: grid !important;
    gap: 12px !important;
}

.ticket-deposit-info .full-price {
    color: #e8e8e8 !important;
    font-weight: 500 !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ticket-deposit-info .deposit-price {
    color: #d4af37 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 8px 0 !important;
}

.ticket-deposit-info .balance-info {
    color: #b8b8b8 !important;
    font-style: italic !important;
    font-size: 13px !important;
    padding-left: 20px !important;
}

/* Modal Deposit Options Styling */
.tribe-tickets__item-deposit-options {
    margin: 15px 0 !important;
    padding: 20px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.tribe-tickets__item-deposit-options:hover {
    border-color: #d4af37 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15) !important;
}

.tribe-tickets__item-deposit-options.deposit-selected {
    border-color: #d4af37 !important;
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%) !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2) !important;
}

.tribe-tickets__item-deposit-options h4 {
    margin: 0 0 15px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    border-bottom: 2px solid #d4af37 !important;
    padding-bottom: 8px !important;
}

.tribe-tickets__item-deposit-options .deposit-payment-options {
    display: grid !important;
    gap: 12px !important;
}

.tribe-tickets__item-deposit-options label {
    display: block !important;
    align-items: flex-start !important;
    padding: 12px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: #ffffff !important;
    margin-bottom: 8px !important;
}

.tribe-tickets__item-deposit-options label:hover {
    border-color: #d4af37 !important;
    background: #fffbf0 !important;
}

.tribe-tickets__item-deposit-options input[type="radio"] {
    margin-right: 12px !important;
    margin-top: 2px !important;
    accent-color: #790000 !important;
}

.tribe-tickets__item-deposit-options .full-amount-display,
.tribe-tickets__item-deposit-options .deposit-amount-display {
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.tribe-tickets__item-deposit-options .deposit-amount-display {
    color: #790000 !important;
}

.tribe-tickets__item-deposit-options small {
    display: block !important;
    margin-left: 24px !important;
    margin-top: 4px !important;
    color: rgb(20, 24, 39) !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

@media(max-width: 768px) {
    .tribe-tickets__item-deposit-options small {
        margin-left: 0 !important;
    }
}

/* Modal Close Button Styling */
.tribe-dialog__close-button.tribe-modal__close-button {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 32px !important;
    height: 32px !important;
    background: #2c3e50 !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tribe-dialog__close-button.tribe-modal__close-button:hover {
    background: #d4af37 !important;
    transform: scale(1.1) !important;
}

.tribe-dialog__close-button.tribe-modal__close-button:before {
    content: "×" !important;
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

/* Price update animations */
.price-updating {
    opacity: 0.6 !important;
    transition: opacity 0.15s ease !important;
}

.showing-deposit {
    color: #d4af37 !important;
}

.deposit-price-display {
    color: #d4af37 !important;
    font-weight: 600 !important;
}

.deposit-indicator {
    font-size: 0.9em !important;
    color: #6c757d !important;
    font-style: italic !important;
}

/* Enhanced radio button selection styling */
.tribe-tickets__item-deposit-options input[type="radio"]:checked+label {
    border-color: #d4af37 !important;
    background: #fffbf0 !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15) !important;
}

/* Dynamic price display */
.tribe-tickets__item-price,
.tribe-tickets__tickets-item-price,
.tribe-tickets__tickets-item-total-wrap {
    transition: all 0.3s ease !important;
    position: relative !important;
}

.tribe-tickets__item-price.price-updating,
.tribe-tickets__tickets-item-price.price-updating,
.tribe-tickets__tickets-item-total-wrap.price-updating {
    opacity: 0.6 !important;
    transform: scale(0.98) !important;
}

.tribe-tickets__item-price.showing-deposit,
.tribe-tickets__tickets-item-price.showing-deposit,
.tribe-tickets__tickets-item-total-wrap.showing-deposit {
    color: #d4af37 !important;
    font-weight: bold !important;
}

/* Modal specific styles */
.tribe-modal .tribe-tickets__item-deposit-options {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-color: #e9ecef !important;
}

.tribe-modal .tribe-tickets__item-deposit-options.deposit-selected {
    /* background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%) !important; */
    border-color: #d4af37 !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .ticket-deposit-info {
        margin-top: 15px !important;
        padding: 15px !important;
    }

    .tribe-tickets__item-deposit-options {
        margin: 10px 0 !important;
        padding: 15px !important;
    }

    .tribe-tickets__item-deposit-options h4 {
        font-size: 14px !important;
    }

    .tribe-tickets__item-deposit-options label {
        padding: 10px !important;
    }

    .tribe-dialog__close-button.tribe-modal__close-button {
        width: 28px !important;
        height: 28px !important;
        top: 10px !important;
        right: 10px !important;
    }

    .tribe-dialog__close-button.tribe-modal__close-button:before {
        font-size: 18px !important;
    }
}

/* Loading states */
.tribe-tickets__item-deposit-options.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.tribe-tickets__item-deposit-options.loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    border: 2px solid #d4af37 !important;
    border-top-color: transparent !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error states */
.tribe-tickets__item-deposit-options.error {
    border-color: #dc3232 !important;
    background-color: #ffeaea !important;
}

.deposit-error-message {
    color: #dc3232 !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    font-style: italic !important;
}

/* Success states */
.tribe-tickets__item-deposit-options.success {
    border-color: #46b450 !important;
    background-color: #ecf7ed !important;
}

/* Accessibility improvements */
.tribe-tickets__item-deposit-options input[type="radio"]:focus+label {
    outline: 2px solid #d4af37 !important;
    outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tribe-tickets__item-deposit-options {
        border-width: 2px !important;
    }

    .tribe-tickets__item-deposit-options.deposit-selected {
        border-width: 3px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .tribe-tickets__item-deposit-options,
    .tribe-tickets__item-deposit-options label,
    .tribe-tickets__item-price,
    .tribe-tickets__tickets-item-price,
    .tribe-tickets__tickets-item-total-wrap,
    .deposit-amount-display,
    .balance-amount-display,
    .full-amount-display {
        transition: none !important;
    }

    .tribe-tickets__item-deposit-options.loading::after {
        animation: none !important;
    }
}

/* Price update animations */
@keyframes priceUpdate {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.price-update-animation {
    animation: priceUpdate 0.3s ease-in-out !important;
}

/* Enhanced visual feedback for deposit selection */
.tribe-tickets__item-deposit-options input[type="radio"]:checked+label .deposit-amount-display,
.tribe-tickets__item-deposit-options input[type="radio"]:checked+label .full-amount-display {
    color: #d4af37 !important;
    font-weight: bold !important;
}

/* Modal-specific price display enhancements */
.tribe-modal .tribe-tickets__item-price.showing-deposit::before {
    content: "💳 " !important;
    font-size: 0.9em !important;
}

/* Modal-specific price update styles */
.tribe-modal .tribe-tickets__tickets-item-total-wrap.price-updating {
    opacity: 0.6 !important;
    transform: scale(0.98) !important;
    transition: all 0.15s ease !important;
}

.tribe-modal .tribe-tickets__tickets-item-total-wrap.showing-deposit {
    color: #d4af37 !important;
    font-weight: bold !important;
}

.tribe-modal .tribe-tickets__tickets-item-total-wrap .deposit-price-display {
    color: #d4af37 !important;
    font-weight: bold !important;
}

.tribe-modal .tribe-tickets__tickets-item-total-wrap .deposit-indicator {
    font-size: 0.8em !important;
    color: #6c757d !important;
    font-weight: normal !important;
    font-style: italic !important;
}

/* Enhanced modal deposit selection feedback */
.tribe-modal .tribe-tickets__tickets-item-total-wrap.showing-deposit::before {
    content: "💳 " !important;
    font-size: 0.9em !important;
}

/* Deposit styling override */
.event-tickets .tribe-tickets__tickets-item-content-title-container {
	grid-column: 1 / 3;
}

.tribe-tickets__item-deposit-options {
	grid-column: 1 / 4;
}

.tribe-tickets__item-deposit-options label,
.tribe-tickets__item-deposit-options label:hover {
    display: block !important;
    align-items: flex-start !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: none !important;
    margin-bottom: 8px !important;
}

.tribe-tickets__item-deposit-options,
.tribe-tickets__item-deposit-options:hover {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.tribe-tickets__item-deposit-options.deposit-selected {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
}


.tribe-tickets__item-deposit-options input[type="radio"] {
	width: fit-content;
    margin-top: -1px !important;
}

.event-tickets .tribe-tickets__form label {
	display: flex !important;
	gap: 5px;
	align-items: center !important;
}

@media(max-width: 768px) {
    .tribe-tickets__item-deposit-options .deposit-amount-display {
        width: 70%;
    }
}

@media(max-width: 768px) {
    .tribe-tickets__tickets-item-content-title-container {
        grid-column: 1 / 3 !important;
    }
}

.ticket-deposit-info {
    display: none !important;
}

@media(max-width: 768px) {
    .tribe-tickets__tickets-item-extra.tribe-tickets__tickets-item-extra--price-suffix {
        padding: 20px 0;
    }
}

@media(max-width: 768px) {
    .event-tickets .tribe-tickets__form label.deposit_price_layout {
        display: flex !important;
        flex-direction: row !important;
        align-items: start !important;
    }
}

.deposit_deposit_layout {
    display: flex !important;
    flex-direction: row !important;
}

@media(max-width: 768px) {
    .deposit_deposit_layout {
        flex-direction: column !important;
    }
}