/**
 * Kurs Booking Popup Styles
 *
 * Standalone CSS for the Neuigkeiten (News) popup.
 * Loaded on ALL frontend pages when popup module is active.
 * This ensures popups display correctly even on pages without
 * kurs-booking shortcodes.
 *
 * @package KursBooking
 * @since   2.13.4
 */

/* ==========================================================================
   CSS Custom Properties (Popup Dependencies)
   ========================================================================== */

:root {
    /* Pferdekurse Premium Theme Colors - Direct Values */
    --kb-primary: #00868b;
    --kb-primary-hover: #006d71;
    --kb-primary-light: rgba(0, 134, 139, 0.1);
    --kb-secondary: #312f2d;
    --kb-accent: #c9a227;
    --kb-success: #16a34a;
    --kb-success-light: #dcfce7;
    --kb-warning: #ca8a04;
    --kb-warning-light: #fef3c7;
    --kb-danger: #dc2626;
    --kb-danger-light: #fee2e2;
    --kb-text: #1f2937;
    --kb-text-light: #6b7280;
    --kb-text-muted: #9ca3af;
    --kb-border: #e5e7eb;
    --kb-border-dark: #d1d5db;
    --kb-bg: #ffffff;
    --kb-bg-light: #f9fafb;
    --kb-bg-dark: #f3f4f6;
    --kb-radius: 8px;
    --kb-radius-sm: 4px;
    --kb-radius-lg: 12px;
    --kb-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --kb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --kb-transition: 0.2s ease;
    --kb-font-heading: 'PT Serif', Georgia, serif;
    --kb-font-body: 'Source Sans Pro', -apple-system, sans-serif;
}

/* ==========================================================================
   News Popup Styles
   ========================================================================== */

.kb-news-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.kb-news-popup--visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.kb-news-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.kb-news-popup__content {
    position: relative;
    background: var(--kb-bg);
    border-radius: var(--kb-radius-lg);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.kb-news-popup--visible .kb-news-popup__content {
    transform: translateY(0) scale(1);
}

.kb-news-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    padding: 0;
    color: var(--kb-text-light);
    cursor: pointer;
    transition: all var(--kb-transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.kb-news-popup__close svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.kb-news-popup__close:hover {
    background: var(--kb-bg);
    color: var(--kb-text);
    transform: rotate(90deg);
}

/* Popup Image */
.kb-news-popup__image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--kb-bg-dark) 0%, var(--kb-border) 100%);
}

.kb-news-popup__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Popup Body */
.kb-news-popup__body {
    padding: 24px;
}

.kb-news-popup__title {
    font-family: var(--kb-font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--kb-text);
    margin: 0 0 12px;
    line-height: 1.3;
}

.kb-news-popup__text {
    font-size: 0.9375rem;
    color: var(--kb-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.kb-news-popup__text p {
    margin: 0 0 12px;
}

.kb-news-popup__text p:last-child {
    margin-bottom: 0;
}

/* Kurs Card im Popup */
.kb-news-popup__kurs {
    background: linear-gradient(135deg, var(--kb-bg-light) 0%, var(--kb-bg-dark) 100%);
    border: 1px solid var(--kb-border);
    border-radius: var(--kb-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.kb-news-popup__kurs-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--kb-text);
    margin-bottom: 8px;
}

.kb-news-popup__kurs-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--kb-text-light);
}

.kb-news-popup__kurs-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kb-news-popup__kurs-date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--kb-primary);
}

.kb-news-popup__kurs-price {
    font-weight: 700;
    color: var(--kb-primary);
}

/* Popup CTA */
.kb-news-popup__actions {
    text-align: center;
}

.kb-news-popup__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--kb-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--kb-radius);
    transition: all var(--kb-transition);
}

.kb-news-popup__cta:hover {
    background: var(--kb-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 134, 139, 0.3);
}

/* ==========================================================================
   Responsive Popup
   ========================================================================== */

@media (max-width: 480px) {
    .kb-news-popup {
        padding: 12px;
    }

    .kb-news-popup__content {
        max-width: 100%;
    }

    .kb-news-popup__body {
        padding: 20px;
    }

    .kb-news-popup__title {
        font-size: 1.25rem;
    }

    .kb-news-popup__kurs-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
