/* Event Ticket System - Elementor Shortcodes Styles */

/* === Allgemeine Styles === */
.ets-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
}

.ets-button-primary {
    background-color: #0073aa;
    color: #fff;
}

.ets-button-primary:hover {
    background-color: #005a87;
    color: #fff;
}

.ets-button-secondary {
    background-color: #f7f7f7;
    color: #333;
    border: 1px solid #ddd;
}

.ets-button-secondary:hover {
    background-color: #e6e6e6;
}

.ets-button-small {
    padding: 8px 16px;
    font-size: 14px;
}

.ets-button-medium {
    padding: 12px 24px;
    font-size: 16px;
}

.ets-button-large {
    padding: 16px 32px;
    font-size: 18px;
}

.ets-button-full-width {
    display: block;
    width: 100%;
}

.ets-button-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ets-button .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

/* === Event Title === */
.ets-event-title {
    color: #333;
    margin: 0 0 20px;
}

.ets-event-title a {
    color: inherit;
    text-decoration: none;
}

.ets-event-title a:hover {
    color: #0073aa;
}

/* === Event Date/Time === */
.ets-event-date,
.ets-event-time {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.ets-event-date .dashicons,
.ets-event-time .dashicons {
    margin-right: 8px;
    color: #666;
}

.ets-label {
    font-weight: 600;
    margin-right: 5px;
}

.ets-date-value,
.ets-time-value {
    color: #555;
}

/* === Event Image === */
.ets-event-image-wrapper {
    margin-bottom: 20px;
}

.ets-event-image {
    width: 100%;
    height: auto;
    display: block;
}

/* === Event Description === */
.ets-event-description {
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

/* === Event Price === */
.ets-event-price {
    font-size: 18px;
    font-weight: bold;
    color: #2ea44f;
    margin-bottom: 15px;
}

.ets-event-price .ets-label {
    color: #333;
    font-weight: normal;
}

/* === Event Availability === */
.ets-event-availability {
    margin-bottom: 20px;
}

.ets-availability-text {
    margin-bottom: 10px;
    font-weight: 600;
}

.ets-sold-out {
    color: #d73502;
}

.ets-availability-bar {
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.ets-availability-progress {
    height: 100%;
    background-color: #2ea44f;
    transition: width 0.3s ease;
}

/* === Event Countdown === */
.ets-event-countdown {
    margin: 30px 0;
}

.ets-countdown-inner {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.ets-countdown-unit {
    text-align: center;
    background-color: #f7f7f7;
    padding: 15px;
    border-radius: 8px;
    min-width: 80px;
}

.ets-countdown-value {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
    line-height: 1;
}

.ets-countdown-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.ets-countdown-expired {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #d73502;
    padding: 20px;
}

/* === Event Info Box === */
.ets-event-info-box {
    background-color: #D3B574 !important;
    color: #611111 !important;
    border: 2px solid #611111 !important;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(97, 17, 17, 0.2);
}

.ets-info-box-default {
    background-color: #D3B574 !important;
}

.ets-info-box-minimal {
    border: none;
    border-left: 4px solid #611111 !important;
    background-color: #D3B574 !important;
    border-radius: 0;
    padding-left: 15px;
}

.ets-info-box-card {
    box-shadow: 0 4px 15px rgba(97, 17, 17, 0.25);
    border: 2px solid #611111 !important;
}

.ets-info-box-image {
    position: relative;
    overflow: hidden;
}

.ets-info-box-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ets-event-info-box:hover .ets-info-box-image img {
    transform: scale(1.05);
}

.ets-info-box-content {
    padding: 25px;
    background-color: #D3B574 !important;
    color: #611111 !important;
}

.ets-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(97, 17, 17, 0.2);
}

.ets-info-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.ets-info-item .dashicons {
    flex-shrink: 0;
    margin-right: 12px;
    margin-top: 2px;
    color: #611111 !important;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.ets-info-text {
    flex: 1;
    line-height: 1.6;
    color: #611111 !important;
}

.ets-info-text strong {
    color: #611111 !important;
    font-weight: 700;
}

/* Spezifische Info-Items */
.ets-info-datetime {
    font-size: 16px;
    color: #611111 !important;
}

.ets-info-datetime strong {
    font-size: 18px;
}

.ets-info-location {
    color: #611111 !important;
}

.ets-info-location strong {
    display: block;
    margin-bottom: 3px;
}

.ets-info-organizer {
    color: #611111 !important;
}

.ets-info-price {
    font-size: 20px;
    font-weight: 700;
    color: #611111 !important;
}

.ets-info-price .woocommerce-Price-amount {
    color: #611111 !important;
}

.ets-info-price .ets-label {
    color: #611111 !important;
}

.ets-info-availability {
    font-size: 14px;
    color: #611111 !important;
}

.ets-info-box-footer {
    padding: 0 25px 25px;
    background-color: #D3B574 !important;
}

/* Button-Styling für die Info-Box */
.ets-info-box-footer .ets-button,
.ets-info-box-footer .ets-buy-button a,
.ets-buy-button-wrapper .ets-button {
    background-color: #611111 !important;
    color: #D3B574 !important;
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ets-info-box-footer .ets-button:hover,
.ets-info-box-footer .ets-buy-button a:hover,
.ets-buy-button-wrapper .ets-button:hover {
    background-color: #4a0d0d !important;
    color: #D3B574 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(97, 17, 17, 0.4);
}

.ets-info-box-footer .ets-button .dashicons,
.ets-buy-button-wrapper .ets-button .dashicons {
    color: #D3B574 !important;
}

.ets-info-box-footer .ets-button-disabled {
    background-color: #999 !important;
    color: #fff !important;
    cursor: not-allowed;
    transform: none;
}

/* === Related Events === */
.ets-related-events {
    margin: 40px 0;
}

.ets-related-events-title {
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
}

.ets-related-events-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.ets-columns-1 {
    grid-template-columns: 1fr;
}

.ets-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ets-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ets-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ets-related-event-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ets-related-event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.ets-related-event-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.ets-related-event-content {
    padding: 15px;
}

.ets-related-event-content h4 {
    margin: 0 0 10px;
    font-size: 18px;
}

.ets-related-event-content h4 a {
    color: #333;
    text-decoration: none;
}

.ets-related-event-content h4 a:hover {
    color: #0073aa;
}

.ets-related-event-date,
.ets-related-event-location {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.ets-related-event-date .dashicons,
.ets-related-event-location .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 5px;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .ets-columns-3,
    .ets-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ets-countdown-inner {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .ets-countdown-unit {
        min-width: 70px;
        padding: 10px;
    }
    
    .ets-countdown-value {
        font-size: 28px;
    }
    
    .ets-info-box-content {
        padding: 20px;
    }
    
    .ets-info-box-footer {
        padding: 0 20px 20px;
    }
    
    .ets-info-item {
        font-size: 14px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .ets-info-item .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .ets-columns-2,
    .ets-columns-3,
    .ets-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .ets-countdown-unit {
        min-width: 60px;
    }
    
    .ets-countdown-value {
        font-size: 24px;
    }
    
    .ets-button {
        padding: 10px 20px;
    }
}

/* === Elementor Editor Styles === */
.elementor-editor-active .ets-countdown-expired {
    display: none;
}

/* Ticket Popup Styles */
.ets-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    animation: etsPopupFadeIn 0.3s ease;
}

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

body.ets-popup-open {
    overflow: hidden;
}

.ets-popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: etsPopupSlideIn 0.3s ease;
}

@keyframes etsPopupSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.ets-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.ets-popup-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.ets-popup-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.ets-popup-close:hover {
    color: #333;
}

.ets-popup-content {
    padding: 25px;
}

.ets-popup-message {
    margin-bottom: 25px;
}

.ets-popup-message p {
    margin: 0;
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
}

.ets-popup-quantity {
    margin-bottom: 25px;
}

.ets-popup-quantity label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.ets-qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ets-qty-minus,
.ets-qty-plus {
    background: #f5f5f5;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    color: #333;
    font-weight: bold;
}

.ets-qty-minus:hover,
.ets-qty-plus:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.ets-qty-input {
    width: 80px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ets-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.ets-popup-cancel,
.ets-popup-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ets-popup-cancel {
    background: #f5f5f5;
    color: #666;
}

.ets-popup-cancel:hover {
    background: #e5e5e5;
}

.ets-popup-confirm {
    background: #4CAF50;
    color: white;
}

.ets-popup-confirm:hover {
    background: #45a049;
}

.ets-popup-loading {
    text-align: center;
    padding: 40px 20px;
}

.ets-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: etsSpinnerRotate 1s linear infinite;
    margin-bottom: 15px;
}

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

.ets-popup-loading p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .ets-popup-container {
        width: 95%;
    }
    
    .ets-popup-header,
    .ets-popup-content {
        padding: 15px 20px;
    }
    
    .ets-popup-actions {
        flex-direction: column;
    }
    
    .ets-popup-cancel,
    .ets-popup-confirm {
        width: 100%;
    }
}