/* ============================================
   Anlaşmalı Kurum Dropdown - Frontend Stili
   ============================================ */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Wrapper */
.akd-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    color: #1e293b;
}

.akd-wrapper *,
.akd-wrapper *::before,
.akd-wrapper *::after {
    box-sizing: border-box;
}

/* Select Group */
.akd-select-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.akd-select-wrapper {
    flex: 1;
    min-width: 220px;
    animation: akdSlideUp 0.4s ease;
}

.akd-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.akd-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #1e293b;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

.akd-select:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.akd-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Loading */
.akd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
}

.akd-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: akdSpin 0.7s linear infinite;
}

/* Result Grid */
.akd-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Card */
.akd-card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    animation: akdFadeIn 0.4s ease both;
}

.akd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.akd-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.akd-card:hover::before {
    opacity: 1;
}

.akd-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #3b82f6;
}

.akd-card-icon svg {
    width: 22px;
    height: 22px;
}

.akd-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.akd-card-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Badge'ler */
.akd-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.akd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    line-height: 1.4;
}

.akd-badge-tamamlayici {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.akd-badge-ozel {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.akd-badge-diger {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fbbf24;
}

.akd-badge-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
}

/* Boş durum */
.akd-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.akd-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #cbd5e1;
}

.akd-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 8px 0;
}

.akd-empty-text {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

/* Category Ajax Filter container (hastane görünümü) */
.akd-wrapper #caf-post-layout-container {
    display: none;
}

.akd-wrapper.akd-view-hospital #caf-post-layout-container {
    display: block;
}

/* Animasyonlar */
@keyframes akdSpin {
    to { transform: rotate(360deg); }
}

@keyframes akdFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes akdSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation delay for staggered cards */
.akd-card:nth-child(1) { animation-delay: 0.05s; }
.akd-card:nth-child(2) { animation-delay: 0.1s; }
.akd-card:nth-child(3) { animation-delay: 0.15s; }
.akd-card:nth-child(4) { animation-delay: 0.2s; }
.akd-card:nth-child(5) { animation-delay: 0.25s; }
.akd-card:nth-child(6) { animation-delay: 0.3s; }
.akd-card:nth-child(7) { animation-delay: 0.35s; }
.akd-card:nth-child(8) { animation-delay: 0.4s; }
.akd-card:nth-child(9) { animation-delay: 0.45s; }

/* Responsive */
@media only screen and (max-width: 1024px) {
    .akd-result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 640px) {
    .akd-select-group {
        flex-direction: column;
    }

    .akd-select-wrapper {
        min-width: 100%;
    }

    .akd-result-grid {
        grid-template-columns: 1fr;
    }

    .akd-card {
        padding: 18px;
    }

    .akd-card-title {
        font-size: 15px;
    }
}
