/* ==========================================================================
   Open Registration Compact Cards
   Themed cards for league events with open registration
   Based on NowPlaying compact pattern from PR 1076
   ========================================================================== */

/* ============================================
   CSS Variables
   ============================================ */
.open-registration-compact {
    --or-radius: 1rem;
    --or-radius-sm: 0.5rem;
    --or-radius-pill: 2rem;

    --or-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    --or-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.25);
    --or-shadow-pill: 0 2px 8px rgba(0, 0, 0, 0.3);

    --or-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Default colors (overridden by league theme) */
    --or-primary: #4a90e2;
    --or-gradient: #357abd;
    --or-contrast: #ffffff;
    --or-text: #ffffff;

    /* Overlay colors */
    --or-overlay-gradient: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );

    /* Glass effect */
    --or-glass: rgba(0, 0, 0, 0.65);
    --or-glass-border: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Section Container
   ============================================ */
.open-registration-compact {
    padding: 1.5rem 0;
}

.open-registration-compact .section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.open-registration-compact .section-header h4 {
    font-family: 'Karla', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--theme-text-primary, #1a1a1a);
}

.open-registration-compact .section-header i {
    color: var(--theme-primary, #00A69C);
    font-size: 1.25rem;
}

/* Dark mode header */
[data-bs-theme="dark"] .open-registration-compact .section-header h4 {
    color: #ffffff;
}

/* ============================================
   Card Grid
   ============================================ */
.or-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .or-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .or-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Card Base
   ============================================ */
.or-card {
    position: relative;
    border-radius: var(--or-radius);
    overflow: hidden;
    box-shadow: var(--or-shadow);
    transition: var(--or-transition);
    background: linear-gradient(135deg, var(--or-primary), var(--or-gradient));
    display: flex;
    flex-direction: column;
}

.or-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--or-shadow-hover);
}

/* Card-level animated background pattern */
.or-card > .tiled-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

/* ============================================
   Hero Section - Horizontal Layout
   ============================================ */
.or-hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
}

/* Image wrapper (left side) - tight fit */
.or-hero-image-wrap {
    flex-shrink: 0;
    border-radius: var(--or-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    line-height: 0;
    align-self: flex-start;
}

.or-hero-image {
    display: block;
    max-width: 240px;
    height: auto;
    transition: var(--or-transition);
}

.or-card:hover .or-hero-image {
    transform: scale(1.05);
}

/* Info section (right side) */
.or-hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

/* League Title - Full width centered section */
.or-league-title {
    position: relative;
    z-index: 1;
    padding: 0.125rem 1rem 0.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.175rem;
}

.or-league-name {
    font-family: 'Karla', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    margin: 0;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.or-league-title .or-event-name {
    font-family: 'Karla', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin: 0;
    line-height: 1.2;
}

/* Week Badge - inline in info section */
.or-week-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: var(--or-contrast, rgba(255, 255, 255, 0.3));
    color: var(--or-contrast-text, #ffffff);
    font-family: 'Karla', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--or-radius-sm);
    box-shadow: var(--or-shadow-pill);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.or-week-badge .week-num {
    font-size: 0.9rem;
}

/* ============================================
   Info Pills (Date, Time, Location, Format)
   ============================================ */
.or-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.4rem;
}

.or-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: var(--or-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--or-glass-border);
    border-radius: var(--or-radius-pill);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.or-pill i {
    font-size: 0.7rem;
    opacity: 0.85;
}

.or-pill--today {
    background: rgba(255, 107, 107, 0.8);
    border-color: rgba(255, 107, 107, 0.3);
}

.or-pill--handicap {
    background: rgba(0, 166, 156, 0.7);
    border-color: rgba(0, 166, 156, 0.3);
}

/* ============================================
   Content Section
   ============================================ */
.or-content {
    position: relative;
    z-index: 1;
    padding: 0 1rem 0.25rem;
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Flippy Says section - compact full width styling */
.or-content .flippy-says-simple {
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.765rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: flex !important;
}

.or-content .flippy-says-simple .flippy-avatar {
    width: 32px;
    height: 32px;
}

/* ============================================
   Pot Pills (Ace Pot / Super Ace)
   ============================================ */
.or-pot-pills {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.25rem;
}

.or-pot-pill {
    flex: 1 1 calc(50% - 0.25rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--or-radius-sm);
    color: #fff;
    font-family: 'Karla', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
}

.or-pot-pill i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.or-pot-pill--ace i {
    color: #ffd700;
}

.or-pot-pill--super {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3), inset 0 0 8px rgba(255, 215, 0, 0.1);
}

.or-pot-pill--super i {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.or-pot-label {
    opacity: 0.85;
    font-weight: 500;
}

.or-pot-amount {
    font-weight: 700;
    color: #fff;
}

/* ============================================
   Action Bar
   ============================================ */
.or-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.75rem;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Action Buttons */
.or-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: var(--or-radius-sm);
    font-family: 'Karla', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--or-transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.or-btn i {
    font-size: 0.8rem;
}

/* Primary button (Register) - full width */
.or-btn--primary {
    background: var(--or-primary);
    color: var(--or-text, #fff);
    flex: 1 1 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.or-btn--primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--or-text, #fff);
    text-decoration: none;
}

/* Secondary buttons - 1/2 width each */
.or-btn--secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1 1 calc(50% - 0.25rem);
}

.or-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: #ffffff;
}

.or-btn--secondary .badge {
    background: var(--or-primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.25rem;
}


/* Friends badge in action bar */
.or-actions .friends-badge-wrapper {
    flex-shrink: 0;
}

.or-actions .friends-badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .open-registration-compact {
        padding-top: 0.25rem;
    }

    .or-hero {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .or-hero-image {
        max-width: 180px;
    }

    /* Mobile: Single column stack */
    .or-hero-info {
        gap: 0.3rem;
    }

    .or-pills {
        flex-direction: column;
        gap: 0.3rem;
        max-width: 100%;
    }

    .or-pill {
        padding: 0.3rem 0.6rem;
        font-size: clamp(0.65rem, 2.5vw, 0.75rem);
        justify-content: center;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Hide handicap pill on mobile */
    .or-pill--handicap {
        display: none;
    }

    .or-event-name {
        font-size: 1.1rem;
    }

    .or-league-name {
        font-size: 0.8rem;
    }

    .or-pot-pill {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    .or-btn--secondary {
        flex: 1 1 100%;
    }
}

/* ============================================
   Empty State
   ============================================ */
.or-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--theme-bg-secondary, #f8f9fa);
    border-radius: var(--or-radius);
    border: 2px dashed var(--theme-border, #dee2e6);
}

[data-bs-theme="dark"] .or-empty {
    background: var(--surface-2, #2a2a2a);
    border-color: var(--surface-3, #3a3a3a);
}

.or-empty-icon {
    font-size: 3rem;
    color: var(--theme-text-tertiary, #9ca3af);
    margin-bottom: 1rem;
}

.or-empty h3 {
    font-family: 'Karla', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text-primary, #1a1a1a);
    margin: 0 0 0.5rem;
}

[data-bs-theme="dark"] .or-empty h3 {
    color: #ffffff;
}

.or-empty p {
    color: var(--theme-text-secondary, #6b7280);
    margin: 0 0 1.5rem;
}

/* ============================================
   Animation Classes (from existing patterns)
   ============================================ */
.or-hero .pattern-move-down-right,
.or-hero .pattern-move-down-left,
.or-hero .pattern-move-up-right,
.or-hero .pattern-move-up-left,
.or-hero .pattern-move-right,
.or-hero .pattern-move-left,
.or-hero .pattern-move-down,
.or-hero .pattern-move-up {
    /* Inherit existing animation classes from site.css */
}
