/**
 * TBF Takvim - Responsive
 * Mobil ve responsive stiller
 */

/* ===== TABLET (1024px ve altı) ===== */
@media (max-width: 1024px) {
    /* Container */
    .tbf-container,
    .tbf-organization-list-container {
        padding: 15px;
    }
    
    /* Header */
    .tbf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .tbf-header h2 {
        font-size: 1.8rem;
    }
    
    /* Filters */
    .tbf-filters {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .tbf-filter-buttons {
        justify-content: center;
    }
    
    /* View Controls */
    .tbf-view-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }
    
    .tbf-info-bar {
        justify-content: space-between;
    }
    
    /* Grids */
    .tbf-organizations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tbf-day-races-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Cards */
    .tbf-org-card-header {
        padding: 20px;
    }
    
    .tbf-org-card-body {
        padding: 15px 20px;
    }
    
    .tbf-org-card-footer {
        padding: 0 20px 20px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    /* List Items */
    .tbf-org-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 20px;
    }
    
    .tbf-org-list-right {
        align-items: stretch;
    }
    
    .tbf-org-list-badges {
        justify-content: flex-start;
    }
    
    .tbf-org-list-actions {
        justify-content: center;
    }
    
    /* Organizasyon Detay */
    .tbf-organization-detail-container {
        padding: 15px;
    }
    
    .tbf-org-detail-header-card {
        padding: 25px;
    }
    
    .tbf-org-detail-header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .tbf-org-detail-right-section {
        flex: none;
    }
    
    .tbf-quick-info-grid {
        grid-template-columns: 1fr;
    }
    
    .tbf-org-detail-title {
        font-size: 2rem;
    }
    
    .tbf-org-detail-subtitle {
        font-size: 1rem;
    }
    
    .tbf-org-detail-badges {
        margin-top: 15px;
    }
    
    .tbf-org-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .tbf-org-detail-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .tbf-org-detail-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .tbf-org-detail-sidebar {
        flex: none;
        width: 100%;
    }
    
    .tbf-org-detail-tabs-section {
        width: 100%;
    }
    
    /* Race Day Tabs */
    .tbf-race-day-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tbf-race-day-btn {
        text-align: center;
        width: 100%;
    }
    
    /* Tabs */
    .tbf-tabs {
        flex-direction: column;
    }
    
    .tbf-tab-link,
    .tbf-tab-btn {
        border-radius: 0;
        border-bottom: 1px solid #e9ecef;
    }
    
    .tbf-tab-link:last-child,
    .tbf-tab-btn:last-child {
        border-bottom: none;
    }
    
    .tbf-tab-content {
        padding: 20px;
    }
    
    /* Program Items */
    .tbf-program-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tbf-program-item-time {
        min-width: auto;
        width: fit-content;
    }
    
    .tbf-program-item-description,
    .tbf-program-item-location {
        margin-left: 0;
    }
    
    /* File Items */
    .tbf-result-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .tbf-result-file-item .tbf-file-icon {
        text-align: left;
        width: auto;
    }
    
    /* Info Items */
    .tbf-org-info-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Pagination */
    .tbf-pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tbf-pagination-btn {
        min-width: 35px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* ===== MOBİL (480px ve altı) ===== */
@media (max-width: 480px) {
    /* Container */
    .tbf-container,
    .tbf-organization-list-container {
        padding: 10px;
    }
    
    /* Header */
    .tbf-header h2 {
        font-size: 1.5rem;
    }
    
    /* Organization Detail */
    .tbf-org-detail-header-card {
        padding: 20px;
    }
    
    .tbf-org-detail-title {
        font-size: 1.8rem;
    }
    
    .tbf-org-detail-subtitle {
        font-size: 0.95rem;
    }
    
    /* Cards */
    .tbf-org-card-header,
    .tbf-org-card-body {
        padding: 15px;
    }
    
    .tbf-org-card-footer {
        padding: 0 15px 15px 15px;
    }
    
    .tbf-org-card-title {
        font-size: 1.1rem;
    }
    
    /* Race Cards */
    .tbf-race-card-header,
    .tbf-race-card-body {
        padding: 15px;
    }
    
    .tbf-race-card-footer {
        padding: 12px 15px;
    }
    
    /* Buttons */
    .tbf-btn,
    .tbf-details-btn,
    .tbf-filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    /* Badges */
    .tbf-badge,
    .tbf-org-badge,
    .tbf-discipline-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    /* Info Cards */
    .tbf-org-info-card,
    .tbf-org-files-card {
        padding: 20px;
    }
    
    /* Tab Content */
    .tbf-tab-content {
        padding: 15px;
    }
    
    /* Quick Info */
    .tbf-quick-info-item {
        padding: 12px;
    }
    
    /* File Meta */
    .tbf-file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Program Day */
    .tbf-program-day-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .tbf-program-item {
        padding: 15px 20px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .tbf-header,
    .tbf-filters,
    .tbf-view-controls,
    .tbf-pagination,
    .tbf-org-card-footer,
    .tbf-race-card-footer,
    .tbf-file-actions {
        display: none !important;
    }
    
    .tbf-container,
    .tbf-organization-list-container {
        max-width: none;
        padding: 0;
    }
    
    .tbf-org-card,
    .tbf-race-card {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .tbf-org-detail-header-card {
        background: white !important;
        color: black !important;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .tbf-org-detail-title {
        color: black !important;
    }
}

/* ===== HOVER STATES FOR TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
    .tbf-org-card:hover,
    .tbf-race-card:hover,
    .tbf-org-list-item:hover,
    .tbf-btn:hover,
    .tbf-filter-btn:hover,
    .tbf-org-info-item:hover,
    .tbf-program-item:hover {
        transform: none;
        box-shadow: var(--tbf-box-shadow);
    }
}

/* ===== LARGE SCREENS (1200px+) ===== */
@media (min-width: 1200px) {
    .tbf-container,
    .tbf-organization-list-container {
        max-width: 1400px;
    }
    
    .tbf-organizations-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
    
    .tbf-day-races-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .tbf-org-card,
    .tbf-race-card,
    .tbf-org-list-item {
        border-width: 2px;
    }
    
    .tbf-btn,
    .tbf-details-btn,
    .tbf-filter-btn {
        border: 2px solid currentColor;
    }
} 

/* =============================================================================
    Organization Detail Responsive - Sonuç Tablosu (ÖNCEKİ KART TASARIMI) - devre dışı bırakıldı
   ========================================================================== */
/*
@media screen and (max-width: 768px) {
  .tbf-results-table {
    border: 0;
  }
  ... kart tasarım kodları ...
}
*/

/* =============================================================================
   Organization Detail Responsive - Sonuç Tablosu (Yatay Kaydırma) - kaldırıldı
   ========================================================================== */
/*
@media screen and (max-width: 768px) {
  .tbf-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  ... yatay kaydırma kodları ...
}
*/

/* =============================================================================
   Organization Detail Responsive - Sonuç Tablosu (Kompakt Görünüm) - kaldırıldı
   ========================================================================== */
/* Artık dikey kart tasarım kullanılıyor */

/* =============================================================================
   Organization Detail Layout - Sidebar ve Ana İçerik - (duplicate kaldırıldı)
   ========================================================================== */
/* Bu kurallar zaten yukarıdaki ana 1024px media query bloğunda mevcut */ 

/* =============================================================================
   Organization Detail Responsive - Sonuç Tablosu (Dikey Kart Tasarım)
   ========================================================================== */
@media screen and (max-width: 768px) {
  .tbf-table-responsive {
    overflow: visible;
  }

  .tbf-results-table {
    border: none;
    width: 100%;
  }

  .tbf-results-table thead {
    display: none;
  }

  .tbf-results-table tbody {
    display: block;
  }

  .tbf-results-table tr {
    display: block;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .tbf-results-table td {
    display: block;
    text-align: left;
    padding: 8px 0;
    border: none;
    border-bottom: 1px dotted #e8e8e8;
  }

  .tbf-results-table td:last-child {
    border-bottom: none;
    text-align: center;
    padding-top: 15px;
  }

  .tbf-results-table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #666;
    display: inline-block;
    margin-bottom: 4px;
  }

  .tbf-results-table td[data-label="İndir"]::before {
    display: none;
  }

  .tbf-download-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.3s ease;
  }

  .tbf-download-btn:hover {
    background: #005a87;
    color: white;
  }
}

/* Tablet için (769px - 1024px arası) - sütunları gizlemeyen kompakt görünüm */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .tbf-table-responsive {
    overflow: visible;
  }

  .tbf-results-table {
    width: 100%;
    font-size: 14px;
  }

  .tbf-results-table th,
  .tbf-results-table td {
    padding: 8px 6px;
    font-size: 13px;
  }

  .tbf-download-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
} 