/**
 * Opposition Profile New Template Styles
 * 
 * Modern layout with prominent stadium image and organized information boxes
 * 
 * RESPONSIVE BREAKPOINTS: Uses standardized values from breakpoints.css
 * - Mobile and smaller: max-width: 768px
 * - Small mobile only: max-width: 480px
 * 
 * @package BTFC_Stats
 */

/* Import Bebas Neue font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* ============================================================================
   SECTION 1: BASE CONTAINER
   ============================================================================
   Description: Main template container with font settings
   ============================================================================ */

.btfc-opposition-newtemplate {
    font-family: var(--font-body);
    background: transparent;
    margin: 0;
    padding: 0;
}

/* ============================================================================
   SECTION 2: STATUS BAR FOR FOLDED/MERGED CLUBS
   ============================================================================
   Description: Warning bar with gradient and animated shimmer effect for
   inactive clubs
   ============================================================================ */

.btfc-status-bar {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-dark) 100%);
    color: var(--color-white);
    padding: var(--space-4) var(--space-5);
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btfc-status-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    animation: btfc-status-shimmer 3s linear infinite;
    pointer-events: none;
}

@keyframes btfc-status-shimmer {
    0% { transform: translateX(-20px); }
    100% { transform: translateX(20px); }
}

.btfc-status-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-width);
    margin: 0 auto;
}

.btfc-status-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.btfc-status-item:last-child {
    margin-bottom: 0;
}

.btfc-status-icon {
    font-size: var(--font-size-base);
    margin-right: var(--space-2);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.btfc-status-text {
    flex: 1;
    font-weight: var(--font-weight-medium);
}

.btfc-status-text strong {
    font-weight: var(--font-weight-bold);
    margin-right: var(--space-1);
}

/* Status item variations */
.btfc-status-item.btfc-defunct {
    background: var(--color-overlay-light);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--space-2);
}

.btfc-status-item.btfc-status-info {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--space-2);
}

.btfc-status-item.btfc-relationship {
    background: rgba(255, 255, 255, 0.08);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--space-2);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.btfc-relationship-notes {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: var(--font-size-xs);
}

.btfc-related-club-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-base);
}

.btfc-related-club-link:hover {
    color: var(--color-warning);
    border-bottom-color: var(--color-warning);
    text-decoration: none;
}

/* Relationship type specific styling */
.btfc-relationship-folded_to {
    border-left-color: var(--color-warning);
}

.btfc-relationship-merged_into {
    border-left-color: var(--color-info);
}

.btfc-relationship-formed_by_merger {
    border-left-color: var(--color-success);
}

/* ============================================================================
   RESPONSIVE DESIGN - Status Bar
   ============================================================================
   STANDARD BREAKPOINTS (from breakpoints.css):
   - Mobile and smaller: @media (max-width: 768px)
   - Small mobile only: @media (max-width: 480px)
   ============================================================================ */

/* Mobile and smaller (768px and below) */
@media (max-width: 768px) {
    .btfc-status-bar {
        padding: var(--space-3) var(--space-4);
    }
    
    .btfc-status-item {
        font-size: var(--font-size-xs);
        margin-bottom: var(--space-1);
    }
    
    .btfc-status-icon {
        font-size: var(--font-size-sm);
        margin-right: var(--space-2);
        width: 18px;
    }
    
    .btfc-status-item.btfc-defunct,
    .btfc-status-item.btfc-relationship {
        padding: var(--space-1) var(--space-2);
    }
    
    .btfc-status-item.btfc-status-info {
        padding: var(--space-1) var(--space-2);
    }
}

/* Small mobile only (480px and below) */
@media (max-width: 480px) {
    .btfc-status-bar {
        padding: var(--space-2) var(--space-3);
    }
    
    .btfc-status-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .btfc-status-icon {
        margin-bottom: var(--space-1);
        margin-right: 0;
    }
}

/* ============================================================================
   SECTION 3: HERO SECTION WITH STADIUM IMAGE
   ============================================================================
   Description: Stadium background image with overlay, club badge, and title display
   ============================================================================ */

.btfc-hero-stadium {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: var(--space-10);
}

.btfc-stadium-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.btfc-stadium-image.btfc-no-image {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

.btfc-placeholder-stadium {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.btfc-stadium-icon {
    font-size: 120px;
    opacity: 0.3;
    display: block;
}

.btfc-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.btfc-hero-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-10);
    z-index: 10;
}

.btfc-hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
}

/* Club Badge */
.btfc-club-badge {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    background: var(--color-overlay-light);
    border-radius: var(--border-radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.btfc-club-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Transparent badge - no background */
.btfc-club-badge.transparent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* PNG badge transparency handled by .transparent class above */

.btfc-badge-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary-dark);
    background: transparent;
    border-radius: var(--border-radius-md);
}

/* Club Details */
.btfc-club-details {
    flex: 1;
    color: var(--color-white);
}

.btfc-club-name {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--space-2) 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: var(--line-height-tight);
}

.btfc-club-nickname {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
    margin: 0 0 var(--space-4) 0;
    opacity: 0.9;
    font-style: italic;
}

.btfc-stadium-name {
    font-size: var(--font-size-lg);
    margin: 0 0 var(--space-4) 0;
    opacity: 0.95;
}

.btfc-stadium-label {
    opacity: 0.8;
    margin-right: var(--space-1);
}

.btfc-club-meta {
    display: flex;
    gap: var(--gap-lg);
    font-size: var(--font-size-base);
}

.btfc-meta-item {
    opacity: 0.9;
}

.btfc-meta-item strong {
    opacity: 0.8;
    margin-right: var(--space-1);
}

/* ============================================
   Content Container
   ============================================ */

.btfc-content-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-5) var(--space-10);
}

/* Statistics Grid removed - not used in template */

/* ============================================================================
   SECTION 4: INFORMATION CARDS GRID
   ============================================================================
   Description: Grid uses .btfc-grid-reverse-2col from breakpoints.css (2→1 columns)
   Grid behavior (display:grid, columns) comes from breakpoints.css
   ============================================================================ */

.btfc-grid-reverse-2col .btfc-full-width {
    grid-column: 1 / -1;
}

/* Info Items */
.btfc-test6-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.btfc-test6-info-item {
    display: flex;
    align-items: flex-start;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-base);
}

.btfc-test6-info-item:last-child {
    border-bottom: none;
}

.btfc-test6-info-item:hover {
    background: transparent;
    padding-left: 0;
    border-radius: 0;
}

.btfc-test6-info-icon {
    font-size: var(--font-size-md);
    margin-right: var(--space-3);
    width: 24px;
    text-align: center;
    color: var(--color-text-secondary);
    flex-shrink: 0;
    margin-top: 2px;
}

.btfc-test6-info-content {
    flex: 1;
}

.btfc-test6-info-label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-1);
    line-height: var(--line-height-normal);
}

.btfc-test6-info-value {
    display: block;
    font-size: var(--font-size-base);
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-relaxed);
}

.btfc-test6-info-value a {
    color: inherit !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.btfc-test6-info-value a:hover {
    color: var(--color-gold) !important;
    text-decoration: underline !important;
    background: transparent !important;
}

/* Override any WordPress theme button styles */
.btfc-test6-info-item a,
.btfc-test6-info-value a {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.btfc-test6-info-item a:before,
.btfc-test6-info-value a:before,
.btfc-test6-info-item a:after,
.btfc-test6-info-value a:after {
    display: none !important;
}


/* ============================================
   Stadium Tabs
   ============================================ */

.btfc-stadium-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 0;
}

.btfc-tab-button {
    flex: 1;
    padding: var(--space-3) var(--space-5);
    background: transparent;
    border: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 3px solid transparent;
}

.btfc-tab-button:hover {
    background: var(--color-bg-alt);
    color: var(--color-text-primary);
}

.btfc-tab-button.active {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-primary);
    background: var(--color-bg-alt);
}

.btfc-tab-content {
    display: none;
    padding: var(--space-5) 0 0 0;
}

.btfc-tab-content.active {
    display: block;
}

/* ============================================
   Stadium History
   ============================================ */

.btfc-stadium-group {
    margin-bottom: var(--space-5);
}

.btfc-stadium-group:last-child {
    margin-bottom: 0;
}

.btfc-stadium-group-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-1);
    border-bottom: 2px solid var(--color-border);
}

.btfc-stadium-item {
    background: var(--color-bg-alt);
    border-radius: var(--border-radius-md);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-2);
    border-left: 3px solid var(--color-text-secondary);
    transition: var(--transition-fast);
}

.btfc-stadium-item:hover {
    background: transparent;
    transform: none;
}

.btfc-stadium-item:last-child {
    margin-bottom: 0;
}

.btfc-stadium-item .btfc-stadium-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.btfc-stadium-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.btfc-stadium-location,
.btfc-stadium-period,
.btfc-stadium-capacity {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-weight: var(--font-weight-medium);
}

.btfc-stadium-location {
    color: var(--color-success);
}

.btfc-stadium-period {
    color: var(--color-accent);
}

.btfc-stadium-capacity {
    color: var(--color-error);
}

/* ============================================
   Recent Matches List
   ============================================ */

.btfc-matches-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.btfc-match-row {
    display: grid;
    grid-template-columns: 100px 1fr 60px 40px 60px;
    gap: var(--gap-md);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-alt);
    border-radius: var(--border-radius-md);
    align-items: center;
    border-left: 4px solid var(--color-border);
    transition: var(--transition-fast);
}

.btfc-match-row:hover {
    background: var(--color-bg-hover);
    transform: translateX(4px);
}

.btfc-match-row.win {
    border-left-color: var(--color-success);
    background: var(--color-success-light);
}

.btfc-match-row.draw {
    border-left-color: var(--color-warning);
    background: var(--color-warning-light);
}

.btfc-match-row.loss {
    border-left-color: var(--color-error);
    background: var(--color-error-light);
}

.btfc-match-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btfc-match-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
}

.btfc-match-season {
    font-size: var(--font-size-2xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-tight);
}

.btfc-match-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btfc-match-comp {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: var(--line-height-tight);
}

.btfc-match-venue {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    line-height: var(--line-height-tight);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btfc-match-score {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
}

.btfc-match-result {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    text-align: center;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--border-radius-sm);
    background: var(--color-white);
}

.btfc-match-attendance {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-align: center;
    font-weight: var(--font-weight-medium);
}

.btfc-match-row.win .btfc-match-result {
    color: var(--color-success);
}

.btfc-match-row.draw .btfc-match-result {
    color: var(--color-warning);
}

.btfc-match-row.loss .btfc-match-result {
    color: var(--color-error);
}

/* ============================================================================
   RESPONSIVE DESIGN - Main Content
   ============================================================================
   STANDARD BREAKPOINTS (from breakpoints.css):
   - Mobile and smaller: @media (max-width: 768px)
   - Small mobile only: @media (max-width: 480px)
   ============================================================================ */

/* Mobile and smaller (768px and below) */
@media (max-width: 768px) {
    /* Hero Section */
    .btfc-hero-stadium {
        height: 400px;
    }
    
    .btfc-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .btfc-club-badge {
        width: 120px;
        height: 120px;
    }
    
    .btfc-club-name {
        font-size: var(--font-size-3xl);
    }
    
    .btfc-club-nickname {
        font-size: var(--font-size-lg);
    }
    
    .btfc-club-meta {
        flex-direction: column;
        gap: var(--space-2);
        align-items: center;
    }
    
    /* Stats Grid removed - not used in template */
    
    /* Grid behavior handled by .btfc-grid-reverse-2col from breakpoints.css */
    
    .btfc-test6-info-item {
        padding: var(--space-2) 0;
    }
    
    .btfc-test6-info-icon {
        font-size: var(--font-size-md);
        width: 22px;
        margin-right: var(--space-2);
    }
    
    .btfc-test6-info-label {
        font-size: var(--font-size-xs);
    }
    
    .btfc-test6-info-value {
        font-size: var(--font-size-sm);
    }
    
    /* Match Rows */
    .btfc-match-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
        padding: var(--space-2) var(--space-3);
    }
    
    .btfc-match-info,
    .btfc-match-details,
    .btfc-match-score,
    .btfc-match-result,
    .btfc-match-attendance {
        text-align: left;
    }
    
    .btfc-match-attendance {
        font-size: var(--font-size-2xs);
    }
}

/* Small mobile only (480px and below) */
@media (max-width: 480px) {
    .btfc-hero-stadium {
        height: 350px;
    }
    
    .btfc-hero-info {
        padding: var(--space-5);
    }
    
    .btfc-club-badge {
        width: 100px;
        height: 100px;
    }
    
    .btfc-club-name {
        font-size: var(--font-size-2xl);
    }
    
    .btfc-club-nickname {
        font-size: var(--font-size-lg);
    }
    
    /* Stats Grid removed - not used in template */
    
    .btfc-test6-info-item {
        padding: var(--space-2) 0;
    }
    
    .btfc-test6-info-icon {
        font-size: var(--font-size-base);
        margin-right: var(--space-2);
        width: 18px;
    }
    
    .btfc-test6-info-label {
        font-size: var(--font-size-xs);
    }
    
    .btfc-test6-info-value {
        font-size: var(--font-size-sm);
    }
    
    /* Stadium Tabs Mobile */
    .btfc-stadium-tabs {
        flex-direction: column;
    }
    
    .btfc-tab-button {
        text-align: left;
        padding: var(--space-2) var(--space-4);
        border-bottom: 1px solid var(--color-border);
        border-right: none;
    }
    
    .btfc-tab-button.active {
        border-bottom-color: var(--color-border);
        border-left: 3px solid var(--color-gold);
    }
    
    /* Stadium History Mobile */
    .btfc-stadium-details {
        flex-direction: column;
        gap: var(--space-1);
    }
    
    .btfc-stadium-location,
    .btfc-stadium-period,
    .btfc-stadium-capacity {
        font-size: var(--font-size-2xs);
    }
}
/* ============================================
   Venue Statistics Table
   ============================================ */

.btfc-venue-stats-table {
    overflow-x: auto;
}

/* Total row styling for shared table */
.btfc-table .total-row {
    background: var(--color-primary-dark) !important;
    color: var(--color-white) !important;
    font-weight: var(--font-weight-bold);
}

.btfc-table .total-row td {
    color: var(--color-white) !important;
}

/* Positive/negative styling within tables */
.btfc-table .positive {
    color: var(--color-success);
    font-weight: var(--font-weight-bold);
}

.btfc-table .negative {
    color: var(--color-error);
    font-weight: var(--font-weight-bold);
}

.btfc-table .total-row .positive,
.btfc-table .total-row .negative {
    color: var(--color-white) !important;
}

