/**
 * Bus Overzicht Shortcode Styles
 */

.bus-overzicht-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Hide all sold-out buses */
.bus-card.soldout {
    display: none !important;
}

.bus-overzicht-header {
    text-align: center;
    margin-bottom: 30px;
}

.bus-overzicht-header h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #1a1a1a;
}

.bus-overzicht-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin: 0;
    font-size: 14px;
    color: #666;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item.available .dot { background: #22c55e; }
.legend-item.limited .dot { background: #f59e0b; }
.legend-item.soldout .dot { background: #ef4444; }

.bus-overzicht-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 4), 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .bus-overzicht-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .bus-overzicht-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .bus-overzicht-grid { grid-template-columns: 1fr; }
}

.bus-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.bus-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.bus-card.soldout {
    opacity: 0.7;
    background: #f9fafb;
}

.bus-card.soldout:hover {
    border-color: #d1d5db;
    transform: none;
    box-shadow: none;
}

.bus-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bus-number {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.bus-status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bus-card.available .bus-status-dot { 
    background: #22c55e; 
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); 
}

.bus-card.limited .bus-status-dot { 
    background: #f59e0b; 
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); 
    animation: pulse 2s infinite; 
}

.bus-card.soldout .bus-status-dot { 
    background: #ef4444; 
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.bus-card-body {
    flex: 1;
}

.bus-availability {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.seats-count {
    font-size: 28px;
    font-weight: 700;
}

.bus-card.available .seats-count { color: #22c55e; }
.bus-card.limited .seats-count { color: #f59e0b; }
.bus-card.soldout .seats-count { color: #ef4444; }

.seats-label {
    font-size: 14px;
    color: #6b7280;
}

.bus-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.bus-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.bus-card.available .bus-progress-fill { background: #22c55e; }
.bus-card.limited .bus-progress-fill { background: #f59e0b; }
.bus-card.soldout .bus-progress-fill { background: #ef4444; }

.bus-status-text {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.bus-price {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.bus-card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.bus-cta {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
    transition: color 0.2s;
}

.bus-card:hover .bus-cta:not(.disabled) {
    color: #1d4ed8;
}

.bus-cta.disabled {
    color: #9ca3af;
}

.bus-overzicht-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.last-updated {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.bus-overzicht-empty {
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}

/* ============================================
   COUNTDOWN STYLES
   ============================================ */

.bus-countdown-wrapper {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bus-countdown-container {
    text-align: center;
    padding: 60px 40px;
    background: #EC1A28;
    border-radius: 24px;
    color: #fff;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    max-width: 700px;
    width: 100%;
}

.countdown-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 40px 0;
    color: #fff;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.countdown-unit {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px 25px;
    min-width: 100px;
}

.countdown-value {
    display: block;
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-separator {
    font-size: 48px;
    font-weight: 300;
    opacity: 0.6;
    padding: 0 5px;
}

.countdown-info {
    margin: 40px 0 0 0;
    font-size: 16px;
    opacity: 0.9;
}

@media (max-width: 600px) {
    .bus-countdown-container {
        padding: 40px 20px;
    }
    
    .countdown-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .countdown-unit {
        min-width: 70px;
        padding: 15px 12px;
    }
    
    .countdown-value {
        font-size: 32px;
    }
    
    .countdown-label {
        font-size: 11px;
    }
    
    .countdown-separator {
        font-size: 32px;
    }
}

/**
 * ============================================
 * BUS TICKETS FORM STYLES
 * ============================================
 */

.cvrsd-bus-tickets-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    max-width: 600px;
}

.cvrsd-tickets-availability {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}
.cvrsd-tickets-availability:not(.cvrsd-low-stock):not(.cvrsd-sold-out):not(.cvrsd-all-selected) {
    background: #d4edda;
    color: #155724;
}
.cvrsd-tickets-availability.cvrsd-low-stock {
    background: #fff3cd;
    color: #856404;
}
.cvrsd-tickets-availability.cvrsd-sold-out {
    background: #f8d7da;
    color: #721c24;
}
.cvrsd-tickets-availability.cvrsd-all-selected {
    background: #d1ecf1;
    color: #0c5460;
}
.cvrsd-icon {
    margin-right: 8px;
}

.cvrsd-tickets-list {
    border-top: 1px solid #eee;
}

.cvrsd-ticket-row {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.cvrsd-ticket-info {
    flex: 1;
}

.cvrsd-ticket-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.cvrsd-ticket-description {
    font-size: 13px;
    color: #666;
}

.cvrsd-ticket-price {
    font-weight: 600;
    font-size: 16px;
    min-width: 70px;
    text-align: right;
}

.cvrsd-ticket-quantity {
    display: flex;
    align-items: center;
    gap: 0;
}

.cvrsd-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s;
}
.cvrsd-qty-btn:hover {
    background: #e0e0e0;
}
.cvrsd-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.cvrsd-qty-minus {
    border-radius: 4px 0 0 4px;
}
.cvrsd-qty-plus {
    border-radius: 0 4px 4px 0;
}

.cvrsd-qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    font-size: 16px;
    font-weight: 600;
    -moz-appearance: textfield;
}
.cvrsd-qty-input::-webkit-outer-spin-button,
.cvrsd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cvrsd-tickets-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.cvrsd-tickets-total {
    font-size: 18px;
}
.cvrsd-total-label {
    color: #666;
}
.cvrsd-total-amount {
    font-weight: 700;
    font-size: 22px;
    margin-left: 10px;
}

.cvrsd-add-to-cart-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.cvrsd-add-to-cart-btn:hover:not(:disabled) {
    background: #218838;
}
.cvrsd-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cvrsd-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cvrsd-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.cvrsd-tickets-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
}
.cvrsd-tickets-message.success {
    background: #d4edda;
    color: #155724;
}
.cvrsd-tickets-message.error {
    background: #f8d7da;
    color: #721c24;
}

.cvrsd-sold-out-message {
    text-align: center;
    padding: 30px;
    color: #721c24;
}

/* Ticket Sale Status Styles */
.cvrsd-ticket-unavailable {
    opacity: 0.7;
    background: #f8f9fa;
}

.cvrsd-ticket-sale-status {
    font-size: 12px;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.cvrsd-sale-not_started {
    background: #fff3cd;
    color: #856404;
}

.cvrsd-sale-ended {
    background: #f8d7da;
    color: #721c24;
}

.cvrsd-not-available-text {
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
}

.cvrsd-no-tickets-available-message {
    text-align: center;
    padding: 20px;
    background: #fff3cd;
    border-radius: 6px;
    color: #856404;
    margin-top: 15px;
}

.cvrsd-no-tickets-available-message p {
    margin: 0;
    font-size: 15px;
}

.cvrsd-no-tickets {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Availability Widget Styles */
.cvrsd-availability-widget {
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    text-align: center;
    margin: 15px 0;
    transition: all 0.3s ease;
}
.cvrsd-availability-widget.cvrsd-status-available {
    border-color: #28a745;
    background: #d4edda;
}
.cvrsd-availability-widget.cvrsd-status-medium {
    border-color: #ffc107;
    background: #fff3cd;
}
.cvrsd-availability-widget.cvrsd-status-low {
    border-color: #fd7e14;
    background: #ffe5d0;
}
.cvrsd-availability-widget.cvrsd-status-soldout {
    border-color: #dc3545;
    background: #f8d7da;
}
.cvrsd-availability-count {
    font-size: 16px;
    margin-bottom: 10px;
}
.cvrsd-count-number {
    font-size: 32px;
    font-weight: bold;
    display: block;
    line-height: 1.2;
}
.cvrsd-status-available .cvrsd-count-number { color: #28a745; }
.cvrsd-status-medium .cvrsd-count-number { color: #856404; }
.cvrsd-status-low .cvrsd-count-number { color: #fd7e14; }
.cvrsd-count-label {
    font-size: 14px;
    color: #666;
}
.cvrsd-count-total {
    font-size: 12px;
    color: #999;
}
.cvrsd-availability-bar {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}
.cvrsd-availability-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.5s ease;
}
.cvrsd-status-medium .cvrsd-availability-bar-fill {
    background: linear-gradient(90deg, #ffc107, #ffca2c);
}
.cvrsd-status-low .cvrsd-availability-bar-fill {
    background: linear-gradient(90deg, #fd7e14, #ff922b);
}
.cvrsd-availability-soldout {
    padding: 10px;
}
.cvrsd-soldout-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}
.cvrsd-soldout-text {
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
}
.cvrsd-availability-updating {
    font-size: 14px;
    color: #666;
}
.cvrsd-updating-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: cvrsd-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
.cvrsd-availability-widget.is-updating .cvrsd-availability-count,
.cvrsd-availability-widget.is-updating .cvrsd-availability-bar,
.cvrsd-availability-widget.is-updating .cvrsd-availability-soldout {
    opacity: 0.5;
}
.cvrsd-availability-widget.is-updating .cvrsd-availability-updating {
    display: block !important;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .cvrsd-ticket-row {
        flex-wrap: wrap;
    }
    .cvrsd-ticket-info {
        width: 100%;
        margin-bottom: 10px;
    }
    .cvrsd-tickets-footer {
        flex-direction: column;
        gap: 15px;
    }
    .cvrsd-add-to-cart-btn {
        width: 100%;
    }
}