/**
 * TVStartup OTT Platform - PPV Checkout Styles
 *
 * Styles for the [ott_ppv_checkout] shortcode.
 * Plan selection page displaying PPV packages and subscription plans.
 *
 * @package Tvstartup_OTT_Platform
 * @since   1.0.8
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.ts-ott-ppv-checkout-wrapper {
    --ts-ott-primary: #2271b1;
    --ts-ott-primary-hover: #135e96;
    --ts-ott-primary-light: rgba(34, 113, 177, 0.08);
    --ts-ott-success: #00a32a;
    --ts-ott-success-bg: rgba(0, 163, 42, 0.08);
    --ts-ott-error: #d63638;
    --ts-ott-error-bg: rgba(214, 54, 56, 0.08);
    --ts-ott-warning: #dba617;
    --ts-ott-warning-bg: rgba(219, 166, 23, 0.08);
    --ts-ott-text: #1d2327;
    --ts-ott-text-light: #646970;
    --ts-ott-border: #c3c4c7;
    --ts-ott-border-light: #dcdcde;
    --ts-ott-bg: #f0f0f1;
    --ts-ott-bg-white: #ffffff;
    --ts-ott-radius: 6px;
    --ts-ott-radius-lg: 12px;
    --ts-ott-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --ts-ott-accent: #8c67ef;
    --ts-ott-accent-light: rgba(140, 103, 239, 0.08);
}

/* ==========================================================================
   Wrapper & Container
   ========================================================================== */

.ts-ott-ppv-checkout-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
    font-family: var(--ts-ott-font-family);
    line-height: 1.5;
    box-sizing: border-box;
}

.ts-ott-ppv-checkout-wrapper *,
.ts-ott-ppv-checkout-wrapper *::before,
.ts-ott-ppv-checkout-wrapper *::after {
    box-sizing: border-box;
}

.ts-ott-ppv-checkout-container {
    width: 100%;
    max-width: 900px;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.ts-ott-ppv-checkout-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.ts-ott-ppv-checkout-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--ts-ott-border-light);
    border-top-color: var(--ts-ott-primary);
    border-radius: 50%;
    animation: ts-ott-ppv-spin 0.8s linear infinite;
}

@keyframes ts-ott-ppv-spin {
    to {
        transform: rotate(360deg);
    }
}

.ts-ott-ppv-checkout-loading p {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--ts-ott-text-light);
}

/* ==========================================================================
   Error State
   ========================================================================== */

.ts-ott-ppv-checkout-error {
    padding: 20px 24px;
    background: var(--ts-ott-error-bg);
    border: 1px solid var(--ts-ott-error);
    border-radius: var(--ts-ott-radius);
    color: var(--ts-ott-error);
    font-size: 14px;
    text-align: center;
}

/* ==========================================================================
   Content Header (thumbnail + title + description)
   ========================================================================== */

.ts-ott-ppv-checkout-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--ts-ott-bg-white);
    border: 1px solid var(--ts-ott-border-light);
    border-radius: var(--ts-ott-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ts-ott-ppv-checkout-thumbnail {
    flex-shrink: 0;
    width: 160px;
    height: 100px;
    border-radius: var(--ts-ott-radius);
    overflow: hidden;
    background: var(--ts-ott-bg);
}

.ts-ott-ppv-checkout-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ts-ott-ppv-checkout-info {
    flex: 1;
    min-width: 0;
}

.ts-ott-ppv-checkout-info h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    color: var(--ts-ott-text);
    line-height: 1.3;
}

.ts-ott-ppv-checkout-info p {
    margin: 0;
    font-size: 14px;
    color: var(--ts-ott-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ts-ott-ppv-checkout-subtitle {
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ts-ott-text-light);
    text-align: center;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.ts-ott-ppv-checkout-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ts-ott-text);
}

.ts-ott-ppv-checkout-section-title::before,
.ts-ott-ppv-checkout-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ts-ott-border-light);
}

.ts-ott-ppv-checkout-section {
    margin-bottom: 32px;
}

.ts-ott-ppv-checkout-section:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Cards Grid
   ========================================================================== */

.ts-ott-ppv-checkout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* ==========================================================================
   PPV Package Card
   ========================================================================== */

.ts-ott-ppv-card {
    position: relative;
    background: var(--ts-ott-bg-white);
    border: 2px solid var(--ts-ott-border-light);
    border-radius: var(--ts-ott-radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ts-ott-ppv-card:hover {
    border-color: var(--ts-ott-primary);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.1);
}

/* Card title */
.ts-ott-ppv-card-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ts-ott-text);
    line-height: 1.3;
}

/* Card description */
.ts-ott-ppv-card-desc {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--ts-ott-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price display */
.ts-ott-ppv-card-price {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--ts-ott-text);
    line-height: 1.2;
}

.ts-ott-ppv-card-price .ts-ott-ppv-currency {
    font-size: 16px;
    font-weight: 500;
    color: var(--ts-ott-text-light);
    vertical-align: super;
    margin-right: 2px;
}

.ts-ott-ppv-card-price--free {
    color: var(--ts-ott-success);
}

/* Duration row */
.ts-ott-ppv-card-duration {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--ts-ott-text-light);
}

.ts-ott-ppv-card-duration svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Badges */
.ts-ott-ppv-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.ts-ott-ppv-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 20px;
    line-height: 1.3;
}

.ts-ott-ppv-badge--lifetime {
    background: var(--ts-ott-primary-light);
    color: var(--ts-ott-primary);
}

.ts-ott-ppv-badge--trial {
    background: var(--ts-ott-success-bg);
    color: var(--ts-ott-success);
}

.ts-ott-ppv-badge--discount {
    background: var(--ts-ott-warning-bg);
    color: #8b6914;
}

.ts-ott-ppv-badge--recommended {
    background: var(--ts-ott-accent-light);
    color: var(--ts-ott-accent);
}

/* Card action button */
.ts-ott-ppv-card-action {
    margin-top: auto;
    padding-top: 8px;
}

.ts-ott-ppv-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ts-ott-font-family);
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    background: var(--ts-ott-primary);
    border: none;
    border-radius: var(--ts-ott-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    line-height: 1.4;
}

.ts-ott-ppv-btn:hover {
    background: var(--ts-ott-primary-hover);
    color: #ffffff;
    text-decoration: none;
}

.ts-ott-ppv-btn:active {
    transform: scale(0.98);
}

.ts-ott-ppv-btn--subscribe {
    background: var(--ts-ott-accent);
}

.ts-ott-ppv-btn--subscribe:hover {
    background: #7553d6;
    color: #ffffff;
    text-decoration: none;
}

.ts-ott-ppv-btn--free {
    background: var(--ts-ott-success);
}

.ts-ott-ppv-btn--free:hover {
    background: #008a22;
    color: #ffffff;
    text-decoration: none;
}

/* ==========================================================================
   PPV Event Card (single card, slightly larger)
   ========================================================================== */

.ts-ott-ppv-event-card {
    position: relative;
    background: var(--ts-ott-bg-white);
    border: 2px solid var(--ts-ott-border-light);
    border-radius: var(--ts-ott-radius-lg);
    padding: 28px;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ts-ott-ppv-event-card:hover {
    border-color: var(--ts-ott-primary);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.1);
}

.ts-ott-ppv-event-card .ts-ott-ppv-card-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.ts-ott-ppv-event-card .ts-ott-ppv-card-desc {
    -webkit-line-clamp: 4;
    margin-bottom: 16px;
}

.ts-ott-ppv-event-card .ts-ott-ppv-card-price {
    margin-bottom: 20px;
}

/* ==========================================================================
   Recommended Card Highlight
   ========================================================================== */

.ts-ott-ppv-card--recommended {
    border-color: var(--ts-ott-accent);
    box-shadow: 0 4px 16px rgba(140, 103, 239, 0.12);
}

.ts-ott-ppv-card--recommended:hover {
    border-color: var(--ts-ott-accent);
    box-shadow: 0 6px 20px rgba(140, 103, 239, 0.18);
}

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

@media (max-width: 768px) {
    .ts-ott-ppv-checkout-container {
        max-width: 100%;
        padding: 0 12px;
    }

    .ts-ott-ppv-checkout-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px;
    }

    .ts-ott-ppv-checkout-thumbnail {
        width: 100%;
        height: 180px;
    }

    .ts-ott-ppv-checkout-grid {
        grid-template-columns: 1fr;
    }

    .ts-ott-ppv-event-card {
        max-width: 100%;
    }

    .ts-ott-ppv-checkout-info h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ts-ott-ppv-checkout-header {
        padding: 14px;
    }

    .ts-ott-ppv-card {
        padding: 18px;
    }

    .ts-ott-ppv-card-price {
        font-size: 24px;
    }

    .ts-ott-ppv-checkout-section-title {
        font-size: 15px;
    }
}
