/* =============================================
   TatilEvim - Müsaitlik Takvimi + Rezervasyon
   ============================================= */

/* Tarih seçici (form içi popover) */
.rezervasyon-tarih-alani {
    position: relative;
    margin-bottom: 1.25rem;
}

.tarih-secici-grup {
    position: relative;
}

.tarih-secici-btn {
    width: 100%;
    text-align: left;
    cursor: pointer;
    background: #fff;
    color: inherit;
}

.tarih-secici-btn:hover {
    border-color: #0a4a7a;
}

.tarih-secici-popover {
    position: absolute;
    z-index: 1200;
    max-width: 340px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
    padding: 0.75rem;
}

.tarih-secici-popover[hidden] {
    display: none !important;
}

.tarih-secici-popover-inner .takvim-header {
    margin-bottom: 0.5rem;
}

.tarih-secici-popover-inner .takvim-header h3 {
    font-size: 0.95rem;
}

.tarih-secici-legend {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    gap: 0.5rem 0.75rem;
}

.tarih-secici-grid .takvim-gun {
    min-height: 34px;
    font-size: 0.8rem;
}

.tarih-secici-grid .takvim-baslik {
    font-size: 0.7rem;
    padding: 0.25rem 0;
}

.tarih-secici-ipucu {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.5rem 0 0;
}

.tarih-secici-grid .takvim-gun.dolu {
    background: #fecaca;
    border-color: #ef4444;
    color: #991b1b;
    font-weight: 600;
}

/* Eski tam sayfa takvim (artık kullanılmıyor) */
.musaitlik-takvim {
    display: none;
}

.takvim-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.takvim-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.takvim-nav-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.takvim-nav-btn:hover {
    background: #f1f5f9;
}

/* Takvim Grid */
.takvim-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.takvim-baslik {
    text-align: center;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #64748b;
    padding: 0.5rem 0;
    text-transform: uppercase;
}

.takvim-gun {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    position: relative;
    transition: all 0.15s;
    min-height: 48px;
}

.takvim-gun.bos {
    background: transparent;
}

.takvim-gun .gun-no {
    font-weight: 500;
}

.takvim-gun .gun-fiyat {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* Durum renkleri */
.takvim-gun.musait {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.takvim-gun.musait:hover {
    background: #d1fae5;
    transform: scale(1.05);
}

@media (hover: none) {
    .takvim-gun.musait:hover {
        background: #ecfdf5;
        transform: none;
    }
}

.takvim-gun.dolu {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    cursor: not-allowed;
}

.takvim-gun.beklemede {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    cursor: not-allowed;
}

.takvim-gun.secilemez,
.takvim-gun.kapali,
.takvim-gun.dolu,
.takvim-gun.beklemede,
.takvim-gun.gecmis,
.takvim-gun.tamamlandi {
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
}

.takvim-gun.kapali,
.takvim-gun.gecmis {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
}

.takvim-gun.gecmis {
    opacity: 0.55;
}

.takvim-gun.tamamlandi {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
}

.takvim-gun.secili {
    outline: 2px solid #0a4a7a;
    outline-offset: 1px;
    background: #dbeafe !important;
    pointer-events: auto;
}

.takvim-gun.aralik {
    background: #eff6ff !important;
    border-color: #93c5fd;
}

.takvim-secim-ipucu {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.75rem 0 0;
}

.fiyat-fark-notu {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

.fiyat-gece-detay {
    margin-top: 1rem;
    overflow-x: auto;
}

.fiyat-gece-tablo {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.fiyat-gece-tablo th,
.fiyat-gece-tablo td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.fiyat-gece-tablo th {
    background: #f8fafc;
    font-weight: 600;
}

.takvim-yukleniyor {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

/* Legend */
.takvim-legend, .takvim-legend-mini {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #475569;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

.legend-box.musait, .dot.musait { background: #a7f3d0; }
.legend-box.dolu, .dot.dolu { background: #fca5a5; }
.legend-box.beklemede, .dot.beklemede { background: #fcd34d; }
.legend-box.kapali, .dot.kapali { background: #e2e8f0; }

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.takvim-legend-mini {
    font-size: 0.75rem;
    gap: 0.8rem;
}

.takvim-legend-mini span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Fiyat Özet */
.fiyat-ozet {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.fiyat-ozet-satir {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.fiyat-ozet-toplam {
    font-size: 1.2rem;
}

.fiyat-ozet-toplam strong {
    color: #0369a1;
}

/* Rezervasyon Formu */
.rezervasyon-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.rezervasyon-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.rezervasyon-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

/* Admin Takvim Stiller */
.takvim-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.takvim-nav h2 {
    margin: 0;
}

/* Admin Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
}

.stat-card .stat-sayi {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card .stat-etiket {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
}

.stat-warning .stat-sayi { color: #d97706; }
.stat-success .stat-sayi { color: #059669; }
.stat-primary .stat-sayi { color: #0369a1; }

/* Detay Grid */
.detay-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.detay-kart {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
}

.detay-kart h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #1e293b;
}

.kart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.detay-tablo {
    width: 100%;
    border-collapse: collapse;
}

.detay-tablo th,
.detay-tablo td {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.detay-tablo th {
    text-align: left;
    color: #64748b;
    font-weight: 500;
    width: 40%;
}

.fiyat-buyuk {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0369a1;
}

.durum-form .btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.link-list {
    list-style: none;
    padding: 0;
}

.link-list li {
    padding: 0.4rem 0;
}

.link-list a {
    color: #0369a1;
    text-decoration: none;
}

.link-list a:hover {
    text-decoration: underline;
}

/* Badge */
.badge-lg {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
}

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

/* Mini tablo */
.mini-tablo {
    font-size: 0.85rem;
}

.mini-tablo th,
.mini-tablo td {
    padding: 0.4rem 0.6rem;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .detay-grid {
        grid-template-columns: 1fr;
    }

    .rezervasyon-form .form-row {
        grid-template-columns: 1fr;
    }

    .takvim-gun {
        min-height: 40px;
        font-size: 0.75rem;
    }

    .takvim-gun .gun-fiyat {
        display: none;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }
}
