/* Panel: Inter (admin_layout ile uyumlu) */
@import url('../fonts/fonts.css');

/* Özel Mor Takvim — örnek HTML ile birebir (Yuvarlak Aralık Seçici) */
[x-cloak] {
    display: none !important;
}

/* Dashboard özel tarih — panelde Tailwind yok; overlay tamamen burada (Tailwind sınıflarına güvenilmez) */
.dashboard-custom-cal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.dashboard-custom-cal-overlay.hidden {
    display: none !important;
}
.dashboard-custom-cal-overlay:not(.hidden) {
    display: flex !important;
}

.dashboard-custom-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.dashboard-custom-cal-header-center {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-custom-cal-header-center svg {
    flex-shrink: 0;
}
.dashboard-custom-cal-chevron {
    color: #94a3b8;
}

.dashboard-custom-cal-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: #94a3b8;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.dashboard-custom-cal-icon-btn:hover {
    background: #f8fafc;
    color: #64748b;
}

.dashboard-custom-cal-title-text {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
}

.dashboard-custom-selection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dashboard-custom-cal-label {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}
.dashboard-custom-range-display-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    margin: 4px 0 0;
}

#dashboard-custom-clear-btn.dash-cal-clear-hidden,
.dash-cal-clear-btn.dash-cal-clear-hidden {
    opacity: 0;
    pointer-events: none;
}
#dashboard-custom-clear-btn.dash-cal-clear-visible,
.dash-cal-clear-btn.dash-cal-clear-visible {
    opacity: 1;
    pointer-events: auto;
}
#dashboard-custom-clear-btn,
.dash-cal-clear-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.15s ease, opacity 0.15s ease;
}
#dashboard-custom-clear-btn:hover,
.dash-cal-clear-btn:hover {
    color: #4f46e5;
}

.dashboard-custom-cal-footer-btns {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.dashboard-custom-cal-footer-btns .btn-cancel {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.dashboard-custom-cal-footer-btns .btn-cancel:hover {
    background: #f8fafc;
}
.dashboard-custom-cal-footer-btns .btn-apply {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background: #334155;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.dashboard-custom-cal-footer-btns .btn-apply:hover {
    background: #1e293b;
}

.calendar-card,
.calendar-card * {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
}

.calendar-card {
    width: 460px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 32px;
    padding: 32px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 8px;
    text-align: center;
}

.weekday-label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.day-cell {
    height: 44px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.day-cell::before {
    content: '';
    position: absolute;
    inset: 4px 0;
    z-index: -1;
    transition: background-color 0.2s ease, border-radius 0.2s ease, opacity 0.2s ease;
}

.day-cell.in-range::before {
    background-color: #f1f5f9;
}

.day-cell.range-start,
.day-cell.range-end {
    color: white !important;
}

.day-cell.range-start::after,
.day-cell.range-end::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: #334155;
    border-radius: 50%;
    z-index: -1;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.35);
}

.day-cell.range-start::before {
    border-radius: 99px 0 0 99px;
    left: 50%;
}

.day-cell.range-end::before {
    border-radius: 0 99px 99px 0;
    right: 50%;
}

.day-cell.range-start.range-end::before {
    display: none;
}

/* Genişlik/margin değiştirme yok — grid hücresi boyutu sabit kalsın (yan hücre titremesini önler) */
.day-cell:hover:not(.muted):not(.range-start):not(.range-end):not(.in-range) {
    background-color: #f1f5f9;
    border-radius: 12px;
}

.day-cell.muted {
    color: #cbd5e1;
    font-weight: 400;
    pointer-events: none;
}

.selection-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

/* Panel: saat satırı (örnekte yok; formlarda kullanılıyor) */
.dash-cal-time-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-cal-time-row label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dash-cal-time-row input[type="time"] {
    flex: 1;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
}

.admin-date-trigger {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    transition: border-color 0.2s ease, background-color 0.15s ease;
}
.admin-date-trigger:hover {
    border-color: #cbd5e1;
    box-shadow: none;
}
.admin-date-trigger:focus {
    outline: none;
}
.admin-date-trigger:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
}
.admin-date-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
}

/* Tarih aralığı — native select benzeri geniş tetikleyici + liste aynı genişlikte */
.admin-date-picker-wrap {
    position: relative;
    width: 100%;
    min-width: 280px;
    max-width: 360px;
}
@media (min-width: 640px) {
    .admin-date-picker-wrap {
        min-width: 300px;
        max-width: 380px;
    }
}
.admin-date-trigger--select {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    height: 40px;
    /* Sol inset ≈ ikon üst/alt boşluğu (40px − 1px×2 kenar − 26px ikon = 6px) */
    padding: 0 12px 0 6px;
    box-sizing: border-box;
}
.admin-date-trigger--select .admin-date-trigger-icon {
    width: 26px;
    height: 26px;
    border-radius: 4px;
}
.admin-date-trigger--select .admin-date-trigger-icon svg,
.admin-date-trigger--select .admin-date-trigger-icon [data-lucide] {
    width: 14px;
    height: 14px;
}
.admin-date-trigger-label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-date-dropdown-shell--wide {
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
}

/* Açılır liste — kapalıyken gizli; Alpine .show ile açılır (dashboard inline stillerinin global karşılığı) */
.admin-date-dropdown {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
}

.admin-date-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.admin-date-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.45) transparent;
}

.admin-date-scrollbar::-webkit-scrollbar {
    width: 5px;
    background: transparent;
}

.admin-date-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-date-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.38);
    border-radius: 10px;
}

.admin-date-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.55);
}

.admin-date-dropdown-shell {
    box-shadow:
        0 1px 4px rgba(15, 23, 42, 0.04),
        0 2px 10px rgba(124, 58, 237, 0.06);
}

.admin-date-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    margin-bottom: 2px;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    border: none;
    background: transparent;
    height: auto;
    min-height: 0;
}

.admin-date-item:hover {
    background-color: rgba(124, 58, 237, 0.06);
    color: #5b21b6;
}

.admin-date-item.active {
    background-color: transparent;
    color: #7c3aed;
    font-weight: 600;
}

.admin-date-item.active:hover {
    background-color: transparent;
    color: #6d28d9;
}
