/* Liste Sayfası Stilleri */

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.6rem 0;
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    /* Allow text truncation */
}

.header-logo {
    height: 2rem;
    width: auto;
    flex-shrink: 0;
    /* Prevent logo from shrinking */
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-btn {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    flex-shrink: 0;
    /* Prevent button from shrinking */
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Filters Section */
.filters-section {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px var(--shadow);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text);
}

.filter-select,
.search-input {
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--white);
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text-light);
}

.results-count {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
}

.results-count span {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Table Section */
.table-section {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px var(--shadow);
}

.table-container {
    overflow-x: auto;
}

.facilities-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.facilities-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.facilities-table th {
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.8rem;
}

.facilities-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.facilities-table tbody tr:hover {
    background: var(--bg);
}

.facilities-table td {
    padding: 0.65rem 0.75rem;
    vertical-align: top;
}

.facilities-table td:nth-child(4) {
    font-size: 0.75rem;
    /* Adres kolonu daha küçük */
    color: var(--text-light);
}

.action-column {
    text-align: center;
    width: 140px;
}

.map-btn {
    padding: 0.4rem 0.85rem;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.map-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Loading */
.loading-row td {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

    .header-title {
        font-size: 0.85rem;
    }

    .header-logo {
        height: 1.5rem;
    }

    .header-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
    }

    .container {
        padding: 1rem;
    }

    .filters-section {
        padding: 1rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
    }

    .results-count {
        margin-left: 0;
        text-align: center;
        order: -1;
        /* Show count first on mobile */
    }

    .table-section {
        padding: 0.75rem;
        margin: 0 -0.5rem;
        /* Extend to edges */
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
    }

    .facilities-table {
        font-size: 0.75rem;
        min-width: 500px;
        /* Reduced from 600px since no address column */
    }

    /* Hide address column on mobile */
    .facilities-table th:nth-child(4),
    .facilities-table td:nth-child(4) {
        display: none;
    }

    .facilities-table th,
    .facilities-table td {
        padding: 0.5rem 0.35rem;
    }

    .facilities-table th {
        font-size: 0.7rem;
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        z-index: 10;
    }

    .map-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .action-column {
        width: 100px;
    }

    /* Improve touch targets */
    .filter-select,
    .search-input {
        min-height: 44px;
        /* iOS recommended touch target */
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 0.8rem;
        gap: 0.25rem;
    }

    .header-logo {
        height: 1.5rem;
    }

    .facilities-table {
        font-size: 0.7rem;
    }

    .facilities-table th,
    .facilities-table td {
        padding: 0.4rem 0.25rem;
    }

    .map-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
    }
}
/* Hospital Sign Icon Override */
.hospital-sign {
    background-color: #0033cc;
    color: white;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    border-radius: 4px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    font-family: 'Inter', sans-serif;
    line-height: 1;
    margin-right: 4px;
    vertical-align: middle;
    text-shadow: none;
}

.custom-marker .hospital-sign {
    width: 32px;
    height: 32px;
    font-size: 20px;
    margin-right: 0;
}
