/**
 * Apache Webinars — Public Styles
 *
 * Copyright (c) 2026 Duckett Tech. All rights reserved.
 */

/* Seat Info on Product Page */
.apache-webinars-info {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.apache-webinars-info .seat-availability {
    font-size: 16px;
    margin-bottom: 10px;
}

.seat-progress-bar {
    background: #e0e0e0;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    margin: 10px 0;
}

.seat-progress-fill {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.seat-sold-out {
    color: #e53935;
    font-weight: bold;
    font-size: 16px;
}

/* Login Prompt */
.apache-webinars-login-prompt {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 15px 0;
}

.apache-webinars-login-prompt a {
    font-weight: 600;
}

/* Grid Cards (Shortcode) */
.apache-webinars-grid {
    margin: 20px 0;
}

.apache-webinar-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.apache-webinar-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.apache-webinar-card-inner {
    padding: 20px;
}

.apache-webinar-thumb {
    margin: -20px -20px 15px -20px;
    overflow: hidden;
}

.apache-webinar-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.apache-webinar-title {
    font-size: 18px;
    margin: 0 0 10px 0;
}

.apache-webinar-title a {
    color: #1d2327;
    text-decoration: none;
}

.apache-webinar-title a:hover {
    color: #2271b1;
}

.apache-webinar-price {
    font-size: 20px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 12px;
}

.apache-webinar-availability {
    margin-bottom: 15px;
    font-size: 14px;
    color: #646970;
}

.apache-webinar-buy-btn {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Badges */
.seat-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seat-badge-sold-out {
    background: #ffebee;
    color: #c62828;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Single Meeting Shortcode */
.apache-webinar-single {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    max-width: 500px;
}

.apache-webinar-single h3 {
    margin-top: 0;
}

/* Seat Map (Emoji Grid) */
.seat-map {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 8px;
    justify-content: center;
}

.seat-map-interactive .seat-icon {
    user-select: none;
}

.seat-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.seat-number {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    line-height: 1;
    user-select: none;
}

.seat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: default;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border: 2px solid transparent;
}

/* Open seat — clickable */
.seat-icon.seat-open {
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.seat-icon.seat-open:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Taken seat — purchased/confirmed */
.seat-icon.seat-taken {
    background: rgba(244, 67, 54, 0.1);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Held seat — held by another user (ORANGE) */
.seat-icon.seat-held {
    background: rgba(255, 152, 0, 0.25);
    border-color: #ff9800;
    cursor: not-allowed;
    animation: seat-pulse-orange 2s infinite;
}

@keyframes seat-pulse-orange {
    0%, 100% { border-color: #ff9800; }
    50% { border-color: #ffb74d; }
}

/* User's own held seat — selected (GREEN) */
.seat-icon.seat-mine {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    cursor: pointer;
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.seat-icon.seat-mine:hover {
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.6);
}

/* Random-picked seat highlight (GOLD pulsing) */
.seat-icon.seat-random-pick {
    background: rgba(255, 193, 7, 0.3);
    border-color: #FFC107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
    animation: seat-random-pulse 1s ease-in-out infinite alternate;
    transform: scale(1.15);
    z-index: 2;
    position: relative;
}

@keyframes seat-random-pulse {
    from { box-shadow: 0 0 6px rgba(255, 193, 7, 0.4); }
    to   { box-shadow: 0 0 14px rgba(255, 193, 7, 0.8); }
}

.seat-icon.seat-random-pick:hover {
    transform: scale(1.25);
}

/* Hold Timer & Actions */
#seat-hold-actions {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0;
    text-align: center;
}

.seat-hold-timer {
    font-size: 16px;
    margin-bottom: 12px;
}

#seat-hold-countdown {
    font-size: 24px;
    font-family: monospace;
    color: #2e7d32;
}

.seat-hold-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.seat-hold-buttons .button.alt {
    background: #4CAF50;
    color: #fff;
    border: none;
    font-weight: 700;
}

.seat-hold-buttons .button.alt:hover {
    background: #388E3C;
}

/* Seat Map Legend */
.seat-map-legend {
    display: flex;
    gap: 16px;
    margin: 8px 0 15px 0;
    font-size: 14px;
    color: #555;
    flex-wrap: wrap;
}

.seat-map-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.seat-map-legend .legend-emoji {
    font-size: 18px;
}

/* Notices */
.seat-notice {
    animation: seat-notice-in 0.3s ease;
}

@keyframes seat-notice-in {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* My Account Cards */
.seat-account-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.seat-account-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.seat-account-card h3 a {
    color: #1d2327;
    text-decoration: none;
}

.seat-account-card h3 a:hover {
    color: #2271b1;
}

.seat-account-card-win {
    border-color: #f0b849;
    border-width: 2px;
    background: #fffdf5;
}

/* My Account Status Badges */
.seat-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.seat-status-selling {
    background: #e8f5e9;
    color: #2e7d32;
}

.seat-status-pending {
    background: #fff3e0;
    color: #e65100;
}

.seat-status-ready {
    background: #e3f2fd;
    color: #1565c0;
}

.seat-status-complete {
    background: #f3e5f5;
    color: #6a1b9a;
}

/* Responsive */
@media (max-width: 768px) {
    .apache-webinars-grid {
        grid-template-columns: 1fr !important;
    }

    .seat-icon {
        font-size: 22px;
        width: 32px;
        height: 32px;
    }

    .seat-map {
        gap: 4px;
        padding: 8px;
    }

    .seat-map-legend {
        gap: 10px;
        font-size: 12px;
    }

    .seat-hold-buttons {
        flex-direction: column;
    }

    .seat-hold-buttons .button {
        margin-left: 0 !important;
    }

    #seat-hold-countdown {
        font-size: 20px;
    }
}
