/**
 * TBF Takvim - Layout
 * Grid, flexbox ve genel düzen stilleri
 */

/* ===== FİLTRELEME BÖLÜMLERİ ===== */
.tbf-filters {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--tbf-box-shadow);
}

.tbf-filter-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tbf-filter-row:last-child {
    margin-bottom: 0;
}

.tbf-filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.tbf-filter-group.tbf-filter-search {
    flex: 2;
}

.tbf-filter-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
}

.tbf-filter-group input,
.tbf-filter-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.tbf-filter-group input:focus,
.tbf-filter-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Arama input placeholder'ı daha koyu yapma */
.tbf-filter-group input::placeholder {
    color: #666;
    opacity: 1;
}

/* Tarih input'ları için özel stiller */
.tbf-filter-group input[type="date"] {
    position: relative;
}

.tbf-filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    color: #007cba;
    cursor: pointer;
    font-size: 16px;
}

.tbf-filter-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
}

.tbf-filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tbf-filter-btn.clear {
    background: #dc3545;
    color: white;
}

.tbf-filter-btn.clear:hover {
    background: #c82333;
}

.tbf-filter-btn.apply {
    background: #007cba;
    color: white;
}

.tbf-filter-btn.apply:hover {
    background: #005a87;
}



/* ===== GÖRÜNÜM KONTROLLERİ ===== */
.tbf-view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: white;
    border: 1px solid var(--tbf-medium-gray);
    border-radius: var(--tbf-border-radius);
    box-shadow: var(--tbf-box-shadow);
}

.tbf-view-buttons {
    display: flex;
    gap: 10px;
}

.tbf-view-btn {
    padding: 10px 20px;
    border: 1px solid var(--tbf-medium-gray);
    background: white;
    border-radius: var(--tbf-border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--tbf-transition);
    font-size: 0.9rem;
}

.tbf-view-btn:hover {
    background-color: var(--tbf-light-gray);
}

.tbf-view-btn.active {
    background-color: var(--tbf-primary-color);
    color: white;
    border-color: var(--tbf-primary-color);
}

.tbf-sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbf-sort-controls label {
    font-weight: 600;
    color: var(--tbf-text-color);
}

/* ===== COMPLETED TOGGLE VE NO-RESULTS ===== */
/* Completed Toggle Section */
.tbf-completed-toggle-section {
    text-align: center;
    margin: 30px 0;
}

.tbf-filter-btn.completed-toggle {
    background: #28a745;
    color: white;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tbf-filter-btn.completed-toggle:hover {
    background: #218838;
}

.tbf-filter-btn.completed-toggle.active {
    background: #dc3545;
}

.tbf-filter-btn.completed-toggle.active:hover {
    background: #c82333;
}

/* No Results State */
.tbf-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.tbf-no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.tbf-no-results-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
}

.tbf-no-results h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.tbf-no-results p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Error State */
.tbf-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

/* ===== GRID VE LIST LAYOUT ===== */
.tbf-organizations-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    opacity: 1 !important;
    visibility: visible !important;
}

.tbf-organizations-list {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    opacity: 1 !important;
    visibility: visible !important;
}

.tbf-organizations-wrapper {
    overflow: visible;
    min-height: 200px;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===== TAMAMLANAN ORGANİZASYONLAR BUTONU ===== */
.show-completed-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin: 20px 0;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
}

.show-completed-btn:hover {
    background: #229954;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ===== FİLTRE TEMİZLE BUTONLARI ===== */
#tbf-clear-filters,
#tbf-clear-filters-completed {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.25);
    margin-top: 10px;
}

#tbf-clear-filters:hover,
#tbf-clear-filters-completed:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    box-shadow: 0 3px 8px rgba(108, 117, 125, 0.35);
}

#tbf-clear-filters:active,
#tbf-clear-filters-completed:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(108, 117, 125, 0.25);
}

/* ===== LOADING STATE ===== */
.tbf-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.tbf-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: tbf-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes tbf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tbf-loading-state p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* ===== PAGINATION ===== */
.tbf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 20px 0;
    gap: 8px;
    flex-wrap: wrap;
}

.tbf-pagination-info {
    font-size: 0.9em;
    color: #6c757d;
    margin-right: 15px;
    white-space: nowrap;
}

.tbf-pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tbf-pagination-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tbf-pagination-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tbf-pagination-btn:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tbf-pagination-btn.active {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-color: #1976d2;
    color: white;
    font-weight: 600;
}

.tbf-pagination-btn.active:hover {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    border-color: #0d47a1;
    color: white;
}

.tbf-pagination-btn:disabled {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== GENEL KAPSAYICI ===== */
.tbf-organization-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

/* ===== HEADER ===== */
.tbf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--tbf-light-gray);
}

.tbf-header h2 {
    color: var(--tbf-text-color);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    background: var(--tbf-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FİLTRELEME BÖLÜMLERİ ===== */
.tbf-filters {
    background: var(--tbf-light-gray);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--tbf-medium-gray);
}

.tbf-filter-group {
    margin-bottom: 10px;
}

.tbf-filter-group:last-child {
    margin-bottom: 0;
}

.tbf-filter-group label {
    display: block;
    font-weight: 600;
    color: var(--tbf-text-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tbf-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* ===== VIEW CONTROLS ===== */
.tbf-view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--tbf-box-shadow);
    border: 1px solid var(--tbf-medium-gray);
}

.tbf-view-toggle {
    display: flex;
    gap: 5px;
    background: var(--tbf-light-gray);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--tbf-medium-gray);
}

.tbf-info-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--tbf-text-muted);
    font-size: 0.9rem;
}

.tbf-organization-count {
    background: var(--tbf-primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ===== GRID LAYOUT ===== */
.tbf-organizations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* ===== LIST LAYOUT ===== */
.tbf-organizations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* ===== PAGINATION ===== */
.tbf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px;
}

.tbf-pagination-btn {
    background: white;
    border: 1px solid var(--tbf-medium-gray);
    color: var(--tbf-text-color);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--tbf-transition);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.tbf-pagination-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tbf-pagination-btn:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tbf-pagination-btn.active {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-color: #1976d2;
    color: white;
    font-weight: 600;
}

.tbf-pagination-btn:disabled {
    background: var(--tbf-light-gray);
    color: var(--tbf-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===== FLEX UTILITIES ===== */
.tbf-flex {
    display: flex;
}

.tbf-flex-column {
    flex-direction: column;
}

.tbf-flex-wrap {
    flex-wrap: wrap;
}

.tbf-justify-center {
    justify-content: center;
}

.tbf-justify-between {
    justify-content: space-between;
}

.tbf-align-center {
    align-items: center;
}

.tbf-gap-10 {
    gap: 10px;
}

.tbf-gap-15 {
    gap: 15px;
}

.tbf-gap-20 {
    gap: 20px;
}

/* ===== SPACING UTILITIES ===== */
.tbf-mb-10 {
    margin-bottom: 10px;
}

.tbf-mb-15 {
    margin-bottom: 15px;
}

.tbf-mb-20 {
    margin-bottom: 20px;
}

.tbf-mb-30 {
    margin-bottom: 30px;
}

.tbf-mt-20 {
    margin-top: 20px;
}

.tbf-mt-30 {
    margin-top: 30px;
}

/* ===== WIDTH UTILITIES ===== */
.tbf-w-full {
    width: 100%;
}

.tbf-w-auto {
    width: auto;
}

/* ===== TEXT UTILITIES ===== */
.tbf-text-center {
    text-align: center;
}

.tbf-text-left {
    text-align: left;
}

.tbf-text-right {
    text-align: right;
}

.tbf-font-bold {
    font-weight: 700;
}

.tbf-font-semibold {
    font-weight: 600;
}

.tbf-font-medium {
    font-weight: 500;
} 