/* arayislar/css/arayis.css - Tam eşleşme filtresi ve renkli badge'ler */

/* ===========================
   GLOBAL STYLES
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5; /* Ana sayfa ile aynı açık gri */
    min-height: 100vh;
    color: #333;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===========================
   HEADER STYLES
=========================== */
.header {
    background:#432151 ;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.kwc_header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.kwc_logo {
    width: 200px;
    margin-right: 20px;
    margin-top: 10px;
}

.intranet-title {
    font-size: 14px;
    color: #ccc;
    letter-spacing: 3px;
    font-weight: 500;
    margin-top: 5px;
    text-align: center;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
    align-items: center;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link.active {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
}

#userName {
    font-weight: 600;
    color: #ffffff;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Admin butonu stilleri */
.admin-btn {
    display: inline-block;
    background: #2d6d3e;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.admin-btn:hover {
    background: #1e4a29;
    color: white;
    text-decoration: none;
}

/* ===========================
   LOADING SCREEN
=========================== */
.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:#432151 ;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-content p {
    font-size: 18px;
    font-weight: 500;
}

/* ===========================
   MAIN CONTAINER
=========================== */
.main-container {
    display: flex;
    min-height: calc(100vh - 80px);
    background: #f5f5f5; /* Ana sayfa ile aynı */
    max-width: 1400px; /* Ana sayfa ile aynı max-width */
    margin: 20px auto; /* Ortala */
    gap: 20px; /* Ana sayfa gibi gap ekle */
    padding: 0 20px; /* Ana sayfa ile aynı padding */
    width: auto; /* Önceki width: 1280px kaldır */
}

/* ===========================
   SIDEBAR STYLES
=========================== */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    height: fit-content;
}

.search-section h3,
.filters h3 {
    color: #374151;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #C41E3A;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.filters {
    margin-top: 30px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.filter-input,
.filter-select,
.budget-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-input:focus,
.filter-select:focus,
.budget-input:focus {
    outline: none;
    border-color: #C41E3A;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* Checkbox styles */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #C41E3A;
}

/* District checkboxes */
.district-checkboxes {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.no-districts {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* Budget range */
.budget-range {
    display: flex;
    gap: 10px;
}

.budget-input {
    flex: 1;
}

.clear-filters-btn {
    width: 100%;
    background: #6b7280;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-filters-btn:hover {
    background: #4b5563;
}

.burakaydin {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.burakaydin a {
    color: #C41E3A;
    text-decoration: none;
}

/* ===========================
   CONTENT AREA
=========================== */
.content {
    flex: 1;
    padding: 20px;
    overflow-x: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.content-header h2 {
    color: #1f2937;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.items-per-page-selector {
    margin-top: 10px;
    font-size: 14px;
    color: #6b7280;
}

.items-per-page-selector select {
    margin-left: 8px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.add-listing-btn {
    background: #C41E3A;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-listing-btn:hover {
    background: #A91B32;
    transform: translateY(-1px);
}

/* ===========================
   YENİ: CONTROLS SECTION - İKİ FİLTRE
=========================== */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.listing-count {
    font-weight: 600;
    color: #374151;
}

/* YENİ: İki filtre yan yana */
.dual-filters {
    display: flex;
    gap: 20px;
    align-items: center;
}

.my-listings-filter,
.exact-match-filter {
    display: flex;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
}

.checkbox-container:hover {
    color: #C41E3A;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #C41E3A;
}

.checkbox-container input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.sort-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

/* ===========================
   YENİ TASARIM - ARAYIŞ KARTLARI
=========================== */

/* Arayış listesi için yeni layout */
.listings-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
}

/* Her arayış kartı - tam genişlik */
.listing-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    margin: 20px;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #C41E3A;
}

/* Arayış başlığı - 1. sıra */
.arayis-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.4;
    padding-right: 120px; /* Eşleşme badge için yer */
}

/* Açıklama - 2. sıra */
.arayis-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Danışman bilgisi - 3. sıra */
.arayis-advisor {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.arayis-advisor .advisor-icon {
    color: #C41E3A;
    font-size: 16px;
}

/* Tag container'lar için genel stil */
.arayis-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    align-items: center;
}

.arayis-tags-label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin-right: 8px;
    min-width: 80px;
}

/* Yayın tipi etiketleri - 4. sıra */
.yayin-tipi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.yayin-tipi-tag {
    background: #3b82f6;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.yayin-tipi-tag.satılık { background: #10b981; }
.yayin-tipi-tag.kiralık { background: #3b82f6; }
.yayin-tipi-tag.devren-satılık { background: #8b5cf6; }
.yayin-tipi-tag.devren-kiralık { background: #f59e0b; }

/* Portföy cinsi - 5. sıra */
.arayis-portfolio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.portfolio-tag {
    background: #6366f1;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

/* Kullanım amacı etiketleri - 6. sıra */
.usage-purpose-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.usage-purpose-tag {
    background: #10b981;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Lokasyon etiketleri - 7. sıra */
.location-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.city-tag {
    background: #ef4444;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.district-tag {
    background: #f97316;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Fiyat aralığı - 8. sıra */
.arayis-budget {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #059669;
}

.budget-icon {
    color: #10b981;
    font-size: 18px;
}

/* Tarih bilgisi - 9. sıra */
.arayis-date {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 5px;
}

/* ===========================
   YENİ: EŞLEŞME BADGE'İ - RENKLER
=========================== */

/* Eşleşme badge'i - 10. sıra (sağ alt) */
.match-count {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
}

/* Varsayılan badge stili */
.match-count-badge {
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    background-color: #000;
}

/* YENİ: Eşleşme var - MOR */
.match-count-badge-has-match {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.4);
}

.match-count-badge-has-match:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
}

/* YENİ: Eşleşme yok - GRİ */
.match-count-badge-no-match {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 3px 10px rgba(107, 114, 128, 0.3);
}

.match-count-badge-no-match:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

/* Hover efektleri */
.listing-card:hover .match-count-badge-has-match {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.listing-card:hover .match-count-badge-no-match {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.5);
}

/* Delete button */
.delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.listing-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* ===========================
   PAGINATION
=========================== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination button {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: #C41E3A;
    color: white;
    border-color: #C41E3A;
}

.pagination button.active {
    background: #C41E3A;
    color: white;
    border-color: #C41E3A;
}

.pagination button:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.page-info {
    padding: 8px 12px;
    color: #6b7280;
    font-size: 14px;
}

/* ===========================
   LOADING & ERROR STATES
=========================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading .spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
    border-top-color: #C41E3A;
}

.loading p {
    color: #6b7280;
    font-size: 16px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .content {
        padding: 15px;
    }
    
    .listing-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .arayis-title {
        font-size: 18px;
        padding-right: 100px;
    }
    
    .arayis-description {
        font-size: 13px;
        max-height: 45px;
        -webkit-line-clamp: 2;
    }
    
    .arayis-tags-row {
        gap: 4px;
        margin-bottom: 8px;
    }
    
    .arayis-tags-label {
        font-size: 12px;
        min-width: 70px;
    }
    
    .yayin-tipi-tag,
    .usage-purpose-tag,
    .district-tag,
    .city-tag {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .portfolio-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .match-count {
        bottom: 15px;
        right: 15px;
    }
    
    .match-count-badge,
    .match-count-badge-has-match,
    .match-count-badge-no-match {
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
    }
    
    .arayis-budget {
        font-size: 14px;
    }
    
    .delete-btn {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .controls-section {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .dual-filters {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .listing-card {
        padding: 15px;
    }
    
    .arayis-title {
        font-size: 16px;
        margin-bottom: 10px;
        padding-right: 80px;
    }
    
    .arayis-tags-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .arayis-tags-label {
        margin-bottom: 4px;
        margin-right: 0;
    }
    
    .match-count-badge,
    .match-count-badge-has-match,
    .match-count-badge-no-match {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .dual-filters {
        gap: 8px;
    }
    
    .checkbox-container {
        font-size: 13px;
    }
}

/* ===========================
   PRINT STYLES
=========================== */
@media print {
    .sidebar,
    .controls-section,
    .pagination-container,
    .delete-btn,
    .match-count {
        display: none;
    }
    
    .content {
        padding: 0;
    }
    
    .listing-card {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .main-container {
        flex-direction: column;
    }
}