/* Ana Kapsayıcı */
#diet-app-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 100%; }

/* MODERN HEADER KARTI */
.modern-card { background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); margin-bottom: 25px; border-left: 6px solid #2ecc71; }
.diet-card-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; }
.diet-pkg-info { flex: 1; min-width: 250px; }
.diet-pkg-title { margin: 0 0 10px 0; font-size: 18px; color: #333; font-weight: 700; }
.diet-progress-bar { width: 100%; height: 8px; background: #eee; border-radius: 4px; margin-bottom: 10px; overflow: hidden; }
.diet-progress-fill { height: 100%; background: #2ecc71; transition: width 0.3s; }
.diet-pkg-meta { font-size: 13px; color: #666; display: flex; gap: 15px; }
.diet-actions { display: flex; gap: 10px; }
.diet-btn-outline { background: #fff; border: 1px solid #ddd; padding: 8px 12px; border-radius: 6px; cursor: pointer; color: #555; font-size: 13px; transition: all 0.2s; }
.diet-btn-outline:hover { border-color: #aaa; background: #f9f9f9; color: #333; }

/* MODAL WRAPPER (Genel) */
.diet-modal-wrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; justify-content: center; align-items: center; }

/* PAKET LİSTESİ */
.diet-pkg-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.diet-pkg-list li { padding: 15px; border-bottom: 1px solid #eee; cursor: pointer; transition: background 0.2s; }
.diet-pkg-list li:hover { background: #f5f5f5; }
.diet-pkg-list li.active { background: #e8f8f5; border-left: 4px solid #2ecc71; }

/* ÖZET LİSTESİ */
.diet-summary-list { list-style: none; margin: 0; padding: 0; max-height: 350px; overflow-y: auto; }
.diet-summary-item { padding: 12px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.diet-summary-item:last-child { border-bottom: none; }
.diet-badge-2x { background: #e67e22; color: #fff; font-size: 10px; padding: 2px 5px; border-radius: 3px; vertical-align: middle; }
.diet-badge-locked { background: #95a5a6; color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 4px; }
.diet-btn-icon-remove { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 16px; padding: 5px; }
.diet-btn-icon-remove:hover { color: #c0392b; background: #eee; border-radius: 50%; }

/* Navigasyon & Grid (Korundu) */
.diet-calendar-nav { display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; }
.diet-btn { padding:8px 15px; background:#eee; border-radius:4px; text-decoration:none; color:#333; font-weight:bold; }
.diet-month-title { font-size:18px; font-weight:bold; text-transform:uppercase; }
.diet-grid { display:grid; grid-template-columns: repeat(7, 1fr); gap:5px; }
.diet-day-header { text-align:center; font-weight:bold; padding:10px 0; color:#999; font-size:12px; }
.diet-day { background:#fff; border:1px solid #e0e0e0; min-height:80px; padding:5px; border-radius:6px; cursor:pointer; position:relative; display:flex; flex-direction:column; justify-content:space-between; }
.diet-day:hover { border-color:#aaa; }
.diet-day.is-empty { background:transparent; border:none; cursor:default; }
.diet-day.status-selected { background:#e8f8f5; border-color:#2ecc71; }
.diet-day.is-locked { background:#f5f5f5; color:#aaa; cursor:not-allowed; }
.diet-day.is-sunday { background:#ffebeb; opacity:0.6; cursor:not-allowed; }
.day-number { font-weight:bold; font-size:14px; }
.day-status { font-size:11px; text-align:center; margin-top:5px; }
.status-text-active { color: #333; font-weight: 500; }
.status-text-passive { color: #ccc; }
.diet-edit-icon { position: absolute; top: 5px; right: 5px; font-size: 16px; color: #95a5a6; opacity: 0.6; padding: 2px; z-index: 10; }
.diet-edit-icon:hover { color: #2c3e50; opacity: 1; }

/* MODAL (Genel) */
#diet-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; justify-content: center; align-items: center; }
.diet-modal { background: #fff; width: 90%; max-width: 400px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); animation: fadeIn 0.2s; }
.diet-modal-header { background: #f9f9f9; padding: 15px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.diet-modal-header h4 { margin: 0; font-size: 16px; }
.diet-modal-close { cursor: pointer; font-size: 20px; color: #999; }
.diet-modal-body { padding: 20px; }
.diet-btn-primary { background: #27ae60; color: #fff; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; }
.diet-btn-danger { background: #e74c3c; color: #fff; border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; font-size: 12px; }

@media (max-width: 600px) {
    .diet-card-top { flex-direction: column; }
    .diet-grid { display:flex; flex-direction:column; }
    .diet-day-header { display:none; }
    .diet-day { min-height:50px; flex-direction:row; align-items:center; margin-bottom:5px; padding: 10px; }
    .day-number { width:50px; }
    .diet-day.is-empty { display:none; }
    .day-status { margin-top: 0; margin-left: auto; }
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }

/* --- YENİ ADRES İKONU STİLİ --- */
.diet-day {
    position: relative; /* İkonu içeride sabitlemek için gerekli */
}

.diet-addr-trigger {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 18px;
    color: #dcdcde; /* Varsayılan sönük gri */
    cursor: pointer;
    z-index: 20; /* Diğer öğelerin üstünde olsun */
    padding: 2px;
    transition: all 0.2s ease;
}

/* Mouse üzerine gelince veya gün seçiliyse belirginleşsin */
.diet-day:hover .diet-addr-trigger,
.diet-day.status-selected .diet-addr-trigger {
    color: #a0a0a0; 
}

/* Eğer özel adres seçiliyse (PHP'de class atadık) */
.diet-addr-trigger.diet-addr-active {
    color: #e67e22 !important; /* Turuncu */
    transform: scale(1.1);
}

/* Mobil için ikonun çok küçük kalmamasını sağla */
@media (max-width: 600px) {
    .diet-addr-trigger {
        font-size: 20px;
        padding: 5px; /* Tıklama alanını genişlet */
    }
	
	/* JS ile işaretlenen eski günleri gizle */
    .diet-day.mobile-archived {
        display: none !important;
    }

    /* Arşiv Butonu Stili */
    .diet-archive-btn {
        width: 100%;
        padding: 12px;
        background: #f1f2f6;
        color: #7f8c8d;
        border: 1px dashed #bdc3c7;
        border-radius: 8px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 10px;
        transition: all 0.3s ease;
        display: flex; /* Flex ile ortala */
        justify-content: center;
        align-items: center;
        gap: 5px;
    }

    .diet-archive-btn:hover {
        background: #eec5c5; /* Hafif kırmızımsı hover */
        color: #c0392b;
        border-color: #e74c3c;
    }
}

/* Masaüstünde butonu her ihtimale karşı gizle */
@media (min-width: 601px) {
    .diet-archive-btn {
        display: none !important;
    }
}
}
/* --- YASAKLI / KAPALI GÜNLER (Bayram, Resmi Tatil vb.) --- */
.diet-day.is-admin-blocked {
    background-color: #fff5f5 !important; /* Çok açık kırmızı arka plan */
    color: #c0392b !important;            /* Koyu kırmızı yazı rengi */
    border: 1px solid #ffcdd2 !important; /* Hafif kırmızı kenarlık */
    cursor: not-allowed !important;       /* İmleç 'Yasak' işaretine döner */
    pointer-events: none;                 /* Tıklamayı TAMAMEN engeller */
    opacity: 0.8;                         /* Hafif silik görünüm */
}

/* Yasaklı günün içindeki durum metni */
.diet-day.is-admin-blocked .day-status {
    color: #e74c3c !important;
    font-weight: bold;
}

/* Yasaklı günde + Ekle yazısı veya ikonlar gizlensin */
.diet-day.is-admin-blocked .dashicons,
.diet-day.is-admin-blocked .diet-edit-icon {
    display: none !important;
}