/* Enhanced Promo Code Hero Section */
.promo-code-hero-container {
    --promo-primary: #6366f1;
    --promo-secondary: #818cf8;
    --promo-accent: #c7d2fe;
    --promo-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --promo-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    margin: 1.5rem auto;
    max-width: 1200px;
    position: relative;
    z-index: 10;
}

/* Compact View */
.promo-code-compact {
    background: var(--theme-bg-primary, #ffffff);
    border: 2px solid var(--promo-accent);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.promo-code-compact:hover {
    transform: translateY(-2px);
    box-shadow: var(--promo-shadow);
    border-color: var(--promo-primary);
}

.promo-code-compact-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    gap: 1.5rem;
}

.promo-code-compact-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.promo-code-icon-wrapper {
    width: 48px;
    height: 48px;
    background: var(--promo-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

.promo-code-compact-info {
    flex: 1;
}

.promo-code-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--theme-text-primary, #1f2937);
    margin-bottom: 0.25rem;
}

.promo-code-tagline {
    font-size: 0.875rem;
    color: var(--theme-text-secondary, #6b7280);
    line-height: 1.4;
}

.promo-code-compact-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.promo-code-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--theme-surface-2, #f9fafb);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0.25rem;
    transition: all 0.2s ease;
}

.promo-code-input-wrapper:focus-within {
    border-color: var(--promo-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.promo-code-input-compact {
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    width: 150px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--theme-text-primary, #1f2937);
}

.promo-code-input-compact:focus {
    outline: none;
}

.promo-code-input-compact::placeholder {
    color: var(--theme-text-muted, #9ca3af);
    font-weight: 500;
    font-size: 0.75rem;
}

.promo-code-submit-compact {
    background: var(--promo-gradient);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.promo-code-submit-compact:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}

.promo-code-submit-compact i {
    font-size: 0.75rem;
}

.promo-code-expand-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--promo-primary);
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.promo-code-compact:hover .promo-code-expand-icon {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

/* Expanded View */
.promo-code-expanded {
    display: none;
    background: var(--theme-bg-primary, #ffffff);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--promo-shadow);
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.08));
    animation: expandIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.promo-code-header {
    background: var(--promo-gradient);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.promo-code-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translate(50%, 50%) rotate(0deg);
    }
    50% {
        transform: translate(50%, 50%) rotate(180deg);
    }
}

.promo-code-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.promo-code-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.promo-code-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.promo-code-header-info h3 {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.promo-code-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 600px;
}

.promo-code-close-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-code-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.promo-code-content {
    padding: 2rem;
}

.promo-code-form-section {
    background: var(--theme-surface-2, #f9fafb);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.promo-code-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.promo-code-input-expanded {
    flex: 1;
    background: var(--theme-bg-primary, #ffffff);
    border: 2px solid var(--theme-border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--theme-text-primary, #1f2937);
    transition: all 0.2s ease;
}

.promo-code-input-expanded:focus {
    outline: none;
    border-color: var(--promo-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.promo-code-input-expanded::placeholder {
    color: var(--theme-text-muted, #9ca3af);
    font-weight: 500;
    font-size: 0.875rem;
}

.promo-code-submit-expanded {
    background: var(--promo-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

.promo-code-submit-expanded:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(99, 102, 241, 0.4);
}

.promo-code-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--theme-text-secondary, #6b7280);
    font-size: 0.875rem;
}

.promo-code-hint i {
    color: var(--promo-primary);
}

/* Benefits Section */
.promo-code-benefits {
    margin-top: 2rem;
}

.promo-code-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text-primary, #1f2937);
    margin-bottom: 1.5rem;
}

.promo-code-section-title i {
    color: var(--promo-primary);
}

.benefit-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.benefit-card {
    background: var(--theme-surface-2, #f9fafb);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.benefit-card:hover {
    border-color: var(--promo-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px 0 rgba(99, 102, 241, 0.15);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--promo-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefit-info h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-text-primary, #1f2937);
    margin-bottom: 0.25rem;
}

.benefit-info p {
    font-size: 0.875rem;
    color: var(--theme-text-secondary, #6b7280);
    margin: 0;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Modal Enhancements */
#promoCodeModal .modal-content {
    background: var(--theme-bg-primary, #ffffff);
    color: var(--theme-text-primary, #212529);
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

#promoCodeModal .modal-header {
    background: var(--promo-gradient);
    color: white;
    border: none;
    padding: 1.5rem;
}

#promoCodeModal .modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

#promoCodeModal .modal-header .btn-close {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    border-radius: 8px;
    padding: 0.5rem;
}

#promoCodeModal .modal-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#promoCodeModal .promo-details {
    background: var(--theme-surface-2, #f8f9fa);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.08));
}

#promoCodeModal .success-icon-wrapper {
    animation: successPulse 1s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .promo-code-compact-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .promo-code-compact-left {
        flex-direction: column;
        text-align: center;
    }

    .promo-code-compact-right {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .promo-code-input-wrapper {
        width: 100%;
    }

    .promo-code-input-compact {
        width: 100%;
    }

    .promo-code-header-left {
        flex-direction: column;
        text-align: center;
    }

    .promo-code-input-group {
        flex-direction: column;
    }

    .benefit-cards {
        grid-template-columns: 1fr;
    }
}

/* Location Filter Styling */
#location-filter-container .card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.125));
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

#location-filter-container .card-body {
    background: var(--bg-secondary, #f8f9fa);
    padding: 1.5rem;
}

#location-filter-container .form-label {
    color: var(--text-secondary, #6c757d);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#location-filter-container .form-control,
#location-filter-container .form-select {
    border-radius: 0.375rem;
    border: 1px solid var(--border-color, #dee2e6);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: var(--bg-primary, white);
    color: var(--text-primary, #212529);
}

#location-filter-container .form-control:focus,
#location-filter-container .form-select:focus {
    border-color: var(--theme-primary, #007bff);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

#location-filter-container .input-group-text {
    background: var(--bg-tertiary, #e9ecef);
    border: 1px solid var(--border-color, #dee2e6);
    color: var(--text-secondary, #6c757d);
}

#location-filter-container .btn {
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

#location-filter-container .search-icon {
    font-size: 1.1rem;
}

.location-display {
    background: var(--bg-tertiary, #e9ecef);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #dee2e6);
}

.location-display i {
    color: var(--theme-primary, #007bff);
}

/* Dark mode overrides */
[data-bs-theme="dark"] {
    #location-filter-container .card {
        background: var(--bg-secondary, #1a1a1a);
        border-color: var(--border-color, #FFFFFF1A);
    }

    #location-filter-container .form-control,
    #location-filter-container .form-select {
        background-color: var(--bg-primary, #0d0d0d);
        border-color: var(--border-color, #FFFFFF1A);
        color: var(--text-primary, #e0e0e0);
    }

    #location-filter-container .form-control:focus,
    #location-filter-container .form-select:focus {
        border-color: var(--theme-primary, #3b82f6);
        box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    }

    #location-filter-container .input-group-text {
        background: var(--bg-tertiary, #262626);
        border-color: var(--border-color, #FFFFFF1A);
        color: var(--text-secondary, #a0a0a0);
    }
}

/* Geolocation button styling */
.btn-geolocation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-geolocation:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-geolocation:active {
    transform: translateY(0);
}

.btn-geolocation i {
    margin-right: 0.375rem;
}

.btn-geolocation.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-geolocation.loading i {
    animation: pulse 1.5s infinite;
}

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

/* Series container styling */
.series-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color, #dee2e6);
}

[data-bs-theme="dark"] {
    .series-container {
        background: var(--bg-secondary, #1a1a1a);
        border-color: var(--border-color, #FFFFFF1A);
    }
}

/* League grouping styling */
.league-group {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color, #dee2e6);
    transition: all 0.3s ease;
}

.league-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.league-type-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--theme-primary, #007bff);
}

.league-type-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--theme-primary, #007bff);
}

.league-type-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #212529);
    margin: 0;
}

.league-count {
    margin-left: auto;
    background: var(--theme-primary, #007bff);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

[data-bs-theme="dark"] {
    .league-group {
        background: var(--bg-secondary, #1a1a1a);
        border-color: var(--border-color, #FFFFFF1A);
    }

    .league-group:hover {
        box-shadow: 0 8px 20px rgba(255, 255, 255, 0.05);
    }

    .league-type-title {
        color: var(--text-primary, #e0e0e0);
    }
}

/* No leagues message styling */
.no-leagues {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 1rem;
    margin: 2rem 0;
}

.no-leagues i {
    font-size: 4rem;
    color: var(--text-muted, #6c757d);
    margin-bottom: 1rem;
}

.no-leagues h3 {
    color: var(--text-secondary, #495057);
    margin-bottom: 0.5rem;
}

.no-leagues p {
    color: var(--text-muted, #6c757d);
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] {
    .no-leagues {
        background: var(--bg-secondary, #1a1a1a);
    }

    .no-leagues h3 {
        color: var(--text-secondary, #a0a0a0);
    }

    .no-leagues p {
        color: var(--text-muted, #6c6c6c);
    }
}

/* Map container styling */
#map-container {
    height: 400px;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] {
    #map-container {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

/* Active leagues counter styling */
.active-leagues-counter {
    background: linear-gradient(135deg, var(--theme-primary, #007bff) 0%, var(--theme-secondary, #0056b3) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.counter-label {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Section headers styling */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--theme-primary, #007bff);
}

.section-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    color: var(--theme-primary, #007bff);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #212529);
    margin: 0;
}

[data-bs-theme="dark"] {
    .section-title {
        color: var(--text-primary, #e0e0e0);
    }
}

/* Animation for location filter button */
@keyframes subtle-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Upcoming League Events Section - Enhanced Contrast */
#upcoming-leagues {
    background-color: var(--bg-primary, #ffffff);
    padding: 2rem 0;
    border-radius: 1rem;
}

#upcoming-leagues h2 {
    color: var(--text-primary, #212529);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#upcoming-leagues .bg-pattern-container {
    pointer-events: none;
}

#upcoming-leagues .tiled-bg-pattern {
    opacity: 0.03 !important; /* Reduced opacity for better contrast */
    mix-blend-mode: multiply;
}

/* Dark mode specific adjustments for upcoming leagues */
[data-bs-theme="dark"] {
    #upcoming-leagues {
        background-color: var(--bg-primary, #0d0d0d);
    }

    #upcoming-leagues h2 {
        color: var(--text-primary, #e0e0e0);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    #upcoming-leagues .tiled-bg-pattern {
        opacity: 0.02 !important;
        mix-blend-mode: screen;
    }
}

#location-filter-container .invalid-feedback {
    color: var(--theme-danger, #ef4444);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    #location-filter-container .btn-outline-secondary i.fa-map-marker-alt,
    .pattern-move-right,
    .pattern-move-left,
    .pattern-move-down,
    .pattern-move-up,
    .pattern-move-down-right,
    .pattern-move-down-left,
    .pattern-move-up-right,
    .pattern-move-up-left,
    .tiled-bg-pattern {
        animation: none !important;
    }
}

/* Widget container styling */
.widget-container {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

/* Main content spacing */
.container.mt-4 {
    margin-top: 2rem !important;
}

/* Widget wrapper spacing */
.d-flex.flex-wrap.gap-4 {
    gap: 2rem !important;
}

/* Individual widget spacing */
.yearly-project,
.pdga-events-widget,
.ace-pots-widget,
.current-series-wrapper {
    margin-bottom: 1.5rem;
}

/* Podcast wrapper has no bottom margin to prevent double spacing */
.podcast-wrapper {
    margin-bottom: 0;
}

/* Widget sections specific spacing */
.widget-container.series-podcast {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Location filter section spacing */
#location-filter-container {
    margin-bottom: 2rem;
}

/* Hero section spacing */
.hero-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* League info section spacing */
.league-info-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Flippy intro section spacing */
.flippy-intro-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* General section spacing for all major sections */
.container.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

/* League map section spacing */
.container.my-5 .card.mb-4 {
    margin-bottom: 2rem !important;
}

/* Registration alerts container spacing */
.container.mt-4:has(.registration-alert) {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Widget flex container specific spacing */
.container.mt-4:has(.d-flex.flex-wrap.gap-4) {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.yearly-project {
    height: 100%;
}

.series-podcast {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.current-series-wrapper {
    flex: 1;
}

.podcast-wrapper {
    display: grid;
    flex: 1;
}

.current-series-module,
.project-widget {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.series-content,
.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .widget-container {
        width: 100%;
        max-width: none;
    }
}

.playerContainer {
    border-radius: 20px !important;
}

/* Location filter container styling (duplicate styles) */
#location-filter-container .card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.125));
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

#location-filter-container .card-body {
    background-color: var(--surface-1, #fff);
    color: var(--text-primary, #212529);
}

#location-filter-container .card-title {
    color: var(--text-primary, #212529);
    font-weight: 600;
}

#location-filter-container .card-text {
    color: var(--text-secondary, #6c757d);
}

#location-filter-container .form-control {
    background-color: var(--surface-2, #f8f9fa);
    border-color: var(--border-color, #ced4da);
    color: var(--text-primary, #212529);
}

#location-filter-container .form-text {
    color: var(--text-muted, #6c757d);
}

#location-filter-container .btn-outline-secondary {
    border-color: var(--border-color, #6c757d);
    color: var(--text-primary, #212529);
    background-color: var(--surface-1, transparent);
}

#location-filter-container .btn-outline-secondary:hover {
    background-color: var(--surface-2, #f8f9fa);
}

#location-filter-container .alert {
    background-color: var(--surface-2, #f8f9fa);
    border-color: var(--border-color, rgba(0, 0, 0, 0.125));
}

[data-bs-theme="dark"] {
    #location-filter-container .card {
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    #location-filter-container .card-body {
        background-color: var(--surface-1, #1e1e1e);
    }

    #location-filter-container .form-control {
        background-color: var(--surface-2, #2d2d2d);
        border-color: rgba(255, 255, 255, 0.1);
        color: var(--text-primary, #e9ecef);
    }

    #location-filter-container .form-control:focus {
        border-color: #3182ce;
        box-shadow: 0 0 0 0.25rem rgba(49, 130, 206, 0.25);
    }

    #location-filter-container .btn-outline-secondary {
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--text-primary, #e9ecef);
    }

    #location-filter-container .btn-outline-secondary:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

    #location-filter-container .alert-info {
        background-color: rgba(49, 130, 206, 0.1);
        border-color: rgba(49, 130, 206, 0.2);
        color: #90cdf4;
    }

    #location-filter-container .alert-warning {
        background-color: rgba(236, 201, 75, 0.1);
        border-color: rgba(236, 201, 75, 0.2);
        color: #fbd38d;
    }

    #location-filter-container .invalid-feedback {
        color: #fc8181;
    }
}

/* Enhanced Registration Alert Buttons */
.registration-alert-register-btn {
    position: relative;
    overflow: hidden;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.registration-alert-register-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.registration-alert-register-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px -3px rgba(0, 0, 0, 0.3);
}

.registration-alert-register-btn i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.registration-alert-register-btn:hover i {
    transform: translateX(2px);
}

.registration-alert-view-btn {
    position: relative;
    overflow: hidden;
    border: 2px solid;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.registration-alert-view-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.registration-alert-view-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px -3px rgba(0, 0, 0, 0.3);
}

.registration-alert-view-btn .badge {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.registration-alert-view-btn:hover .badge {
    transform: scale(1.1);
}

/* Clicking animation */
.registration-alert-register-btn.clicking,
.registration-alert-view-btn.clicking {
    animation: button-pulse 0.6s ease-out;
}

@keyframes button-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
        transform: scale(0.98);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        transform: scale(1);
    }
}

/* Enhanced event action buttons in Upcoming Events section */
.event-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-action-buttons .btn {
    position: relative;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.event-action-buttons .btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
}

.event-action-buttons .btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 5px 10px -3px rgba(0, 0, 0, 0.3) !important;
}

.event-action-buttons .btn i {
    transition: transform 0.3s ease;
}

.event-action-buttons .btn:hover i {
    transform: translateX(2px);
}

/* Background pattern bounce effect animations */
@keyframes pattern-move-right {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400px 0;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes pattern-move-left {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: -400px 0;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes pattern-move-down {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 0 400px;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes pattern-move-up {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 0 -400px;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes pattern-move-down-right {
    0% {
        background-position: 0 0;
    }
    25% {
        background-position: 200px 200px;
    }
    50% {
        background-position: 400px 400px;
    }
    75% {
        background-position: 200px 200px;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes pattern-move-down-left {
    0% {
        background-position: 0 0;
    }
    25% {
        background-position: -200px 200px;
    }
    50% {
        background-position: -400px 400px;
    }
    75% {
        background-position: -200px 200px;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes pattern-move-up-right {
    0% {
        background-position: 0 0;
    }
    25% {
        background-position: 200px -200px;
    }
    50% {
        background-position: 400px -400px;
    }
    75% {
        background-position: 200px -200px;
    }
    100% {
        background-position: 0 0;
    }
}

@keyframes pattern-move-up-left {
    0% {
        background-position: 0 0;
    }
    25% {
        background-position: -200px -200px;
    }
    50% {
        background-position: -400px -400px;
    }
    75% {
        background-position: -200px -200px;
    }
    100% {
        background-position: 0 0;
    }
}

/* Apply animations to pattern classes */
.pattern-move-right {
    animation: pattern-move-right 120s linear infinite;
}

.pattern-move-left {
    animation: pattern-move-left 120s linear infinite;
}

.pattern-move-down {
    animation: pattern-move-down 120s linear infinite;
}

.pattern-move-up {
    animation: pattern-move-up 120s linear infinite;
}

.pattern-move-down-right {
    animation: pattern-move-down-right 120s linear infinite;
}

.pattern-move-down-left {
    animation: pattern-move-down-left 120s linear infinite;
}

.pattern-move-up-right {
    animation: pattern-move-up-right 120s linear infinite;
}

.pattern-move-up-left {
    animation: pattern-move-up-left 120s linear infinite;
}

/* Enhanced event details styling */
.event-details-container {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.event-detail-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.event-detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.45);
}

.event-detail-item i {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-right: 0.75rem;
}

.event-detail-text {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    /* Color removed to allow inline styles to work */
}

/* Format description styling */
.event-detail-description {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    /* Color removed to allow inline styles to work */
}

/* Format section specific styling for Singles/Handicap layout */
.event-detail-format {
    align-items: flex-start !important;
}

.event-detail-format .format-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-detail-format .format-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.event-detail-format .handicap-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 0.5rem;
}

.event-detail-format a.handicap-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

/* League description container */
.league-description-container {
    margin-bottom: 1rem;
}

/* Dark mode enhanced styling */
[data-bs-theme="dark"] {
    .event-detail-item {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .event-detail-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    /* Removed forced white text color to allow inline styles to work */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .event-details-container {
        flex-direction: column;
    }

    .event-detail-item {
        width: 100%;
        justify-content: center;
    }
}

/* Clicking animation for theme buttons (continuation) */
@keyframes league-theme-button-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--league-primary-rgb, 45, 55, 72), 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(var(--league-primary-rgb, 45, 55, 72), 0);
        transform: scale(0.98);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--league-primary-rgb, 45, 55, 72), 0);
        transform: scale(1);
    }
}

/* Additional styles extracted from remaining inline blocks */

/* Base styling for location filter (light mode) - from line 183 style block */
#location-filter-container .card {
    transition: all 0.3s ease;
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.125));
    box-shadow: var(--theme-shadow, 0 1px 3px 0 rgba(0, 0, 0, 0.1));
    overflow: hidden;
}

#location-filter-container .card-body {
    background-color: var(--theme-surface-1, #ffffff);
    color: var(--theme-text-primary, #2d3748);
}

#location-filter-container .card-title {
    color: var(--theme-text-primary, #2d3748);
    font-weight: 600;
}

#location-filter-container .card-text {
    color: var(--theme-text-secondary, #4a5568);
}

#location-filter-container .form-control {
    background-color: var(--theme-surface-2, #f8f9fa);
    border-color: var(--theme-border-color, #ced4da);
    color: var(--theme-text-primary, #2d3748);
}

#location-filter-container .form-text {
    color: var(--theme-text-muted, #718096);
}

#location-filter-container .btn-outline-secondary {
    border-color: var(--theme-border-color, #6c757d);
    color: var(--theme-text-primary, #2d3748);
    background-color: var(--theme-surface-1, transparent);
    transition: all 0.3s ease;
}

#location-filter-container .btn-outline-secondary:hover {
    background-color: var(--theme-surface-2, #f8f9fa);
}

#location-filter-container .alert {
    background-color: var(--theme-surface-2, #f8f9fa);
    border-color: var(--theme-border-color, rgba(0, 0, 0, 0.125));
}

/* Dark mode overrides - from line 183 style block */
[data-bs-theme="dark"] {
    /* Location filter card */

    #location-filter-container .card {
        border-color: var(--theme-border-color, rgba(255, 255, 255, 0.1));
        box-shadow: var(--theme-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.5));
    }

    #location-filter-container .card-body {
        background-color: var(--theme-surface-1, #1e293b);
    }

    #location-filter-container .card-title {
        color: var(--theme-text-primary, #e2e8f0);
    }

    #location-filter-container .card-text {
        color: var(--theme-text-secondary, #cbd5e1);
    }

    /* Form elements */

    #location-filter-container .form-control {
        background-color: var(--theme-surface-2, #334155);
        border-color: var(--theme-border-color, rgba(255, 255, 255, 0.1));
        color: var(--theme-text-primary, #e2e8f0);
    }

    #location-filter-container .form-control:focus {
        border-color: var(--theme-info, #3b82f6);
        box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
    }

    #location-filter-container .form-text {
        color: var(--theme-text-muted, #94a3b8);
    }

    /* Enhanced button styling */

    #location-filter-container .btn-outline-secondary {
        border-color: var(--theme-border-color, rgba(255, 255, 255, 0.2));
        color: var(--theme-text-primary, #e2e8f0);
        background-color: var(--theme-surface-1, #1e293b);
    }

    #location-filter-container .btn-outline-secondary:hover {
        background-color: var(--theme-surface-2, #334155);
        transform: translateY(-2px);
        box-shadow: var(--theme-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.5));
    }

    #location-filter-container .btn-outline-secondary i.text-primary {
        color: var(--theme-info, #3b82f6) !important;
    }

    #location-filter-container .btn-outline-secondary strong {
        color: var(--theme-info, #3b82f6);
    }

    /* Add subtle pulsing effect to the location icon */
    @keyframes subtle-pulse {
        0% {
            transform: scale(1);
            opacity: 0.8;
        }
        50% {
            transform: scale(1.05);
            opacity: 1;
        }
        100% {
            transform: scale(1);
            opacity: 0.8;
        }
    }

    #location-filter-container .btn-outline-secondary i.fa-map-marker-alt {
        animation: subtle-pulse 2s infinite ease-in-out;
        color: var(--theme-info, #3b82f6) !important;
    }

    /* Alert variants */

    #location-filter-container .alert-info {
        background-color: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.2);
        color: var(--theme-info, #3b82f6);
    }

    #location-filter-container .alert-warning {
        background-color: rgba(245, 158, 11, 0.1);
        border-color: rgba(245, 158, 11, 0.2);
        color: var(--theme-warning, #f59e0b);
    }

    #location-filter-container .invalid-feedback {
        color: var(--theme-danger, #ef4444);
    }
}

/* Modal styling is already handled in darktheme.css */

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    #location-filter-container .btn-outline-secondary i.fa-map-marker-alt,
    .pattern-move-right,
    .pattern-move-left,
    .pattern-move-down,
    .pattern-move-up,
    .pattern-move-down-right,
    .pattern-move-down-left,
    .pattern-move-up-right,
    .pattern-move-up-left,
    .tiled-bg-pattern {
        animation: none !important;
    }
}

/* Style block from line 1303 - League card theme font styles */
/* Note: These styles are dynamically generated per league card and contain league-specific font data.
   They should remain inline as they reference specific league IDs and Google Font URLs.
   Moving these to external CSS would break the dynamic font loading functionality. */

/* Community Resources Section Styling */
.community-resources-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.community-resources-section .collapsible-section {
    background: var(--bg-primary, #ffffff);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #e9ecef);
    transition: all 0.3s ease;
}

.community-resources-section .collapsible-header {
    background: var(--bg-secondary, #f8f9fa) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.community-resources-section .collapsible-header:hover {
    background: var(--bg-tertiary, #e9ecef) !important;
}

.community-resources-section .collapsible-header h2 {
    color: var(--text-primary, #212529);
    font-weight: 600;
}

.community-resources-section .collapsible-header p {
    color: var(--text-secondary, #6c757d) !important;
}

.community-resources-section .collapse-icon {
    color: var(--text-secondary, #6c757d);
    transition: transform 0.3s ease;
    font-size: 1.25rem;
}

.community-resources-section .collapsible-section.expanded .collapse-icon {
    transform: rotate(180deg);
}

.community-resources-section .collapsible-content {
    padding: 1.5rem;
    background: var(--bg-primary, #ffffff);
}

/* Tab Styling */
.community-resources-section .nav-tabs {
    border-bottom: 2px solid var(--border-color, #dee2e6);
    flex-wrap: wrap;
}

.community-resources-section .nav-tabs .nav-link {
    color: var(--text-secondary, #6c757d);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: -2px;
    background: transparent;
}

.community-resources-section .nav-tabs .nav-link:hover {
    color: var(--theme-primary, #007bff);
    border-bottom-color: var(--theme-primary, #007bff);
    background: var(--bg-secondary, #f8f9fa);
}

.community-resources-section .nav-tabs .nav-link.active {
    color: var(--theme-primary, #007bff);
    background: transparent;
    border-bottom-color: var(--theme-primary, #007bff);
}

.community-resources-section .nav-tabs .nav-link i {
    font-size: 1.1rem;
}

.community-resources-section .tab-content {
    background: var(--bg-primary, #ffffff);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

/* Mobile Responsive Tabs */
@media (max-width: 768px) {
    .community-resources-section .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .community-resources-section .nav-tabs .nav-link i {
        font-size: 1rem;
        margin-right: 0.25rem !important;
    }

    .community-resources-section .tab-content {
        padding: 1rem;
    }

    .community-resources-section .collapsible-header h2 {
        font-size: 1.25rem;
    }

    .community-resources-section .collapsible-header p {
        font-size: 0.8rem;
    }
}

/* Dark Mode Styling */
[data-bs-theme="dark"] {
    .community-resources-section .collapsible-section {
        background: var(--bg-primary, #1a1a1a);
        border-color: var(--border-color, #FFFFFF1A);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .community-resources-section .collapsible-header {
        background: var(--bg-secondary, #262626) !important;
    }

    .community-resources-section .collapsible-header:hover {
        background: var(--bg-tertiary, #333333) !important;
    }

    .community-resources-section .collapsible-header h2 {
        color: var(--text-primary, #e0e0e0);
    }

    .community-resources-section .collapsible-header p {
        color: var(--text-secondary, #a0a0a0) !important;
    }

    .community-resources-section .collapse-icon {
        color: var(--text-secondary, #a0a0a0);
    }

    .community-resources-section .collapsible-content {
        background: var(--bg-primary, #1a1a1a);
    }

    .community-resources-section .nav-tabs {
        border-bottom-color: var(--border-color, #FFFFFF1A);
    }

    .community-resources-section .nav-tabs .nav-link {
        color: var(--text-secondary, #a0a0a0);
    }

    .community-resources-section .nav-tabs .nav-link:hover {
        color: var(--theme-primary, #3b82f6);
        border-bottom-color: var(--theme-primary, #3b82f6);
        background: var(--bg-secondary, #262626);
    }

    .community-resources-section .nav-tabs .nav-link.active {
        color: var(--theme-primary, #3b82f6);
        border-bottom-color: var(--theme-primary, #3b82f6);
    }

    .community-resources-section .tab-content {
        background: var(--bg-primary, #1a1a1a);
    }
}

/* Fix widget styling within tabs */
.community-resources-section .podcast-wrapper,
.community-resources-section .current-series-wrapper,
.community-resources-section .yearly-project {
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .community-resources-section .podcast-wrapper,
    .community-resources-section .current-series-wrapper,
    .community-resources-section .yearly-project {
        max-width: 600px;
    }
}

/* Smooth transitions for tab content */
.community-resources-section .tab-pane {
    transition: opacity 0.15s linear;
}

.community-resources-section .tab-pane.fade {
    opacity: 0;
}

.community-resources-section .tab-pane.fade.show {
    opacity: 1;
}

/* Collapsible Widget Stack Styling */
.collapsible-widgets-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.collapsible-widgets-stack > div {
    margin-bottom: 0;
}

/* Keep widgets properly separated with their own border radius */
.collapsible-widgets-stack > div .card,
.collapsible-widgets-stack > div .yearly-project-header,
.collapsible-widgets-stack > div .ace-pots-header-collapsible,
.collapsible-widgets-stack > div .series-header-collapsible,
.collapsible-widgets-stack > div .pdga-events-header-collapsible {
    border-radius: 16px !important;
}

/* Special handling for collapsible content */
.collapsible-widgets-stack .collapse.show + .collapsible-widgets-stack > div:first-of-type {
    margin-top: 0;
}

/* Ensure proper spacing between widgets */
.collapsible-widgets-stack > div + div {
    margin-top: 0;
}

/* Handle expanded states */
.collapsible-widgets-stack .yearly-project-details-content,
.collapsible-widgets-stack .ace-pots-details-content,
.collapsible-widgets-stack .series-details-content,
.collapsible-widgets-stack .pdga-events-details-content {
    border-radius: 0 0 16px 16px;
}

/* Ensure all widgets maintain their rounded corners */
.collapsible-widgets-stack .yearly-project-details-content,
.collapsible-widgets-stack .ace-pots-details-content,
.collapsible-widgets-stack .series-details-content,
.collapsible-widgets-stack .pdga-events-details-content,
.collapsible-widgets-stack .card {
    border-radius: 16px !important;
}

/* PDGA Events Widget - special handling for card structure */
.pdga-events-widget .card {
    margin-bottom: 0 !important;
}

.pdga-events-widget .card-header {
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

/* Responsive stacking */
@media (max-width: 768px) {
    .collapsible-widgets-stack {
        margin-bottom: 1rem;
    }

    .collapsible-widgets-stack > div:last-child {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   Handicap Module - Similar to HandicapHistory Hero Card
   ========================================================================== */
#handicap-module .handicap-hero-card {
    background: linear-gradient(135deg, #4A5568 0%, #2D3748 100%);
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
    border-radius: 12px;
    box-shadow: var(--theme-shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.1));
    overflow: hidden;
    position: relative;
}

#handicap-module .handicap-dismiss {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.2s;
}

#handicap-module .handicap-dismiss:hover {
    opacity: 1;
}

#handicap-module .handicap-hero-card,
#handicap-module .handicap-hero-card * {
    color: white !important;
}

#handicap-module .card-header {
    background: linear-gradient(135deg, var(--theme-primary, #4A5568), var(--theme-gradient, #2D3748));
    color: white;
    padding: 1.25rem;
    border-bottom: none;
}

#handicap-module .btn-explain {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

#handicap-module .btn-explain:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    color: white;
}

#handicap-module .handicap-display {
    padding: 2rem;
}

#handicap-module .handicap-value-container {
    margin-bottom: 1rem;
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#handicap-module .handicap-value {
    font-size: 4rem;
    font-weight: 700;
    color: white !important;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#handicap-module .handicap-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    font-weight: 500;
}

#handicap-module .handicap-explanation h3 {
    color: var(--theme-text-primary, #212529);
    font-weight: 600;
}

#handicap-module .handicap-status {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
}

#handicap-module .handicap-status.positive-handicap {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
}

#handicap-module .handicap-status.negative-handicap {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid var(--theme-accent, #FFD700);
}

#handicap-module .handicap-status.scratch-handicap {
    background: rgba(108, 117, 125, 0.1);
    border-left: 4px solid #6c757d;
}

#handicap-module .handicap-status.no-handicap {
    background: rgba(23, 162, 184, 0.1);
    border-left: 4px solid #17a2b8;
}

#handicap-module .status-icon {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

#handicap-module .positive-handicap .status-icon {
    color: #28a745;
}

#handicap-module .negative-handicap .status-icon {
    color: var(--theme-accent, #FFD700);
}

#handicap-module .scratch-handicap .status-icon {
    color: #6c757d;
}

#handicap-module .no-handicap .status-icon {
    color: #17a2b8;
}

/* Course Handicaps Preview */
#handicap-module .course-handicaps-preview {
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
    padding-top: 1.5rem;
}

#handicap-module .course-handicap-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
}

#handicap-module .course-handicap-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#handicap-module .course-name {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#handicap-module .course-handicap-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

/* Dark mode support */
[data-bs-theme="dark"] #handicap-module .handicap-hero-card {
    background: var(--surface-1, #1a1a1a);
    border-color: var(--theme-border-color, rgba(255, 255, 255, 0.1));
}

[data-bs-theme="dark"] #handicap-module .handicap-status {
    background: var(--surface-2, #2a2a2a);
}

[data-bs-theme="dark"] #handicap-module .course-handicap-card {
    background: var(--surface-2, #2a2a2a);
}

/* Handicap Module Specific Overrides */
#handicap-module .alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: rgba(59, 130, 246, 0.2) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    display: block; /* Override flex from alert-modern */
    animation: none; /* Disable slide animation */
}

#handicap-module .alert::before {
    display: none; /* Remove the left border from alert-modern */
}

#handicap-module .alert-heading {
    margin-bottom: 0.5rem;
}

#handicap-module .alert ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

#handicap-module .alert li {
    margin-bottom: 0.25rem;
}

/* Fix dismiss button visibility */
#handicap-module .handicap-dismiss {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    color: white;
}

#handicap-module .handicap-dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
    color: white;
}

#handicap-module .handicap-dismiss::before,
#handicap-module .handicap-dismiss::after {
    background-color: white;
}

/* Dark mode dismiss button */
[data-bs-theme="dark"] #handicap-module .handicap-dismiss {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] #handicap-module .handicap-dismiss:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] #handicap-module .handicap-dismiss::before,
[data-bs-theme="dark"] #handicap-module .handicap-dismiss::after {
    background-color: var(--theme-text-primary);
}

/* Handicap Hero Image */
#handicap-module .handicap-hero-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    animation: float 6s ease-in-out infinite;
}

/* Adjust value display when image is present */
#handicap-module .col-lg-5 .handicap-value-container {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: inline-block;
    min-width: 200px;
}

#handicap-module .col-lg-5 .handicap-value {
    font-size: 3.5rem !important;
    color: white !important;
    font-weight: 700 !important;
}

/* Dark mode adjustments - removed as we use same style for both modes */

/* Responsive adjustments */
@media (max-width: 991px) {
    #handicap-module .handicap-hero-image {
        max-width: 200px;
    }

    #handicap-module .col-lg-5 .handicap-value {
        font-size: 2rem;
    }
}

/* ============================================
   Adaptive Widget Layout - Fixes White Space Issue
   ============================================ */

/* Default two-column layout */
.widget-layout-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.widget-column {
    flex: 1;
    min-width: 320px;
    max-width: 450px;
}

/* Single column layout when left column is empty */
.widget-section.single-column-layout .widget-layout-container {
    max-width: 800px;
    margin: 0 auto;
}

.widget-section.single-column-layout .widget-column-right {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.widget-section.single-column-layout .widget-column-left {
    display: none;
}

/* Hide empty widget columns to prevent white space */
.widget-column-left:empty,
.widget-column-left.column-empty {
    display: none;
}

/* When only right column has content */
.widget-section.right-only .widget-layout-container {
    justify-content: center;
}

.widget-section.right-only .widget-column-right {
    max-width: 800px;
    flex: 0 1 800px;
}

/* Better centering for single content */
.widget-section.has-single-content .widget-layout-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Empty state detection */
[data-widget]:empty {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .widget-column {
        width: 100%;
        max-width: none;
    }

    .widget-section.single-column-layout .widget-column-right {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .widget-layout-container {
        flex-direction: column;
        align-items: center;
    }

    .widget-column-left,
    .widget-column-right {
        width: 100%;
        max-width: none;
    }
}

/* ============================================
   Mobile Section Gap Reduction
   Reduces vertical spacing between all major sections on mobile
   ============================================ */
@media (max-width: 767px) {
    /* Hero and intro sections */
    .hero-section {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .flippy-intro-section {
        margin-top: 0.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    .league-info-section {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Upcoming leagues section */
    #upcoming-leagues {
        padding: 0.5rem 0 !important;
    }

    /* Location filter and map */
    #location-filter-container {
        margin-bottom: 0.5rem !important;
    }

    #map-container {
        margin-bottom: 0.5rem !important;
    }

    /* General container spacing */
    .container.my-5 {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .container.mt-4 {
        margin-top: 0.5rem !important;
    }

    /* Community resources section */
    .community-resources-section {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Widget containers */
    .d-flex.flex-wrap.gap-4 {
        gap: 0.5rem !important;
    }

    .yearly-project,
    .pdga-events-widget,
    .ace-pots-widget,
    .current-series-wrapper {
        margin-bottom: 0.5rem !important;
    }

    .widget-container.series-podcast {
        gap: 0.5rem !important;
    }

    /* Series container */
    .series-container {
        margin-bottom: 0.5rem !important;
        padding: 0.75rem !important;
    }

    /* League groups */
    .league-group {
        margin-bottom: 0.5rem !important;
        padding: 0.75rem !important;
    }

    /* No leagues message */
    .no-leagues {
        padding: 1.5rem 1rem !important;
        margin: 0.5rem 0 !important;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Collapsible widgets stack */
    .collapsible-widgets-stack {
        gap: 0.5rem !important;
    }

    /* Promo code hero */
    .promo-code-hero-container {
        margin: 0.5rem auto !important;
    }

    /* Widget flex container */
    .container.mt-4:has(.d-flex.flex-wrap.gap-4) {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Registration alerts */
    .container.mt-4:has(.registration-alert) {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Active leagues counter */
    .active-leagues-counter {
        margin-bottom: 0.5rem !important;
        padding: 0.75rem !important;
    }
}
