/* ============================================
   ADMIN PANEL STYLES
   Hidden admin interface for availability mgmt
   ============================================ */

/* ---- Leaf Icon in Footer ---- */
.admin-leaf {
    display: inline-block;
    cursor: pointer;
    opacity: 0.12;
    transition: opacity 0.4s ease;
    font-size: 0.85em;
    line-height: 1;
    vertical-align: middle;
    margin-right: 6px;
    user-select: none;
    -webkit-user-select: none;
    filter: grayscale(0.6);
}

.admin-leaf:hover {
    opacity: 0.35;
}

/* ---- Login Modal ---- */
.admin-login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

.admin-login-overlay.active {
    display: flex;
}

.admin-login-box {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 40px 36px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: adminSlideIn 0.3s ease;
}

@keyframes adminSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-login-box h3 {
    color: #e8e8e8;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}

.admin-login-box .admin-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 10px;
    background: #111;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.admin-login-box .admin-input:focus {
    border-color: #4a7c59;
}

.admin-login-box .admin-input::placeholder {
    color: #555;
}

.admin-login-btn {
    margin-top: 16px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #2d5e3f;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.admin-login-btn:hover {
    background: #3a7a50;
}

.admin-login-btn:disabled {
    background: #333;
    cursor: not-allowed;
}

.admin-login-error {
    color: #e05555;
    font-size: 0.82rem;
    margin-top: 12px;
    min-height: 1.2em;
}

.admin-login-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.admin-login-close:hover {
    color: #fff;
}

/* ---- Admin Panel Modal ---- */
.admin-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 20px;
}

.admin-panel-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.admin-panel {
    background: #141414;
    border-radius: 20px;
    max-width: 580px;
    width: 100%;
    margin: 40px auto;
    padding: 32px 28px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    animation: adminSlideIn 0.35s ease;
    position: relative;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2a2a;
}

.admin-panel-header h2 {
    color: #e8e8e8;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-panel-header h2::before {
    content: '🔐';
    font-size: 1em;
}

.admin-header-actions {
    display: flex;
    gap: 8px;
}

.admin-btn-logout,
.admin-btn-close {
    background: none;
    border: 1px solid #333;
    color: #999;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.admin-btn-logout:hover {
    border-color: #e05555;
    color: #e05555;
}

.admin-btn-close:hover {
    border-color: #888;
    color: #fff;
}

/* ---- Therapist Filter ---- */
.admin-therapist-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-filter-btn {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    background: #1a1a1a;
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.admin-filter-btn.active {
    border-color: #4a7c59;
    background: rgba(45, 94, 63, 0.15);
    color: #7cc092;
}

.admin-filter-btn:hover:not(.active) {
    border-color: #444;
    color: #bbb;
}

/* ---- Admin Calendar ---- */
.admin-calendar {
    margin-bottom: 20px;
}

.admin-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.admin-cal-title {
    color: #ccc;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
}

.admin-cal-nav {
    background: none;
    border: 1px solid #333;
    color: #999;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.admin-cal-nav:hover {
    border-color: #666;
    color: #fff;
}

.admin-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.admin-weekdays div {
    text-align: center;
    color: #555;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

.admin-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.admin-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
}

.admin-cal-day:hover:not(.empty):not(.past) {
    background: rgba(255, 255, 255, 0.06);
    border-color: #444;
}

.admin-cal-day.empty {
    cursor: default;
}

.admin-cal-day.past {
    color: #333;
    cursor: default;
}

.admin-cal-day.today {
    border-color: #4a7c59;
    color: #7cc092;
}

.admin-cal-day.selected {
    background: #2d5e3f;
    color: #fff;
    font-weight: 600;
}

/* Dot indicators for blocked days */
.admin-cal-day.has-blocks::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e0a030;
}

.admin-cal-day.fully-blocked {
    background: rgba(224, 85, 85, 0.15);
    color: #e07070;
}

.admin-cal-day.fully-blocked::after {
    background: #e05555;
}

/* ---- Day Detail Panel ---- */
.admin-day-detail {
    background: #1a1a1a;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid #2a2a2a;
}

.admin-day-title {
    color: #ddd;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-day-title span {
    font-size: 1.1em;
}

.admin-block-full {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #111;
    border-radius: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid #2a2a2a;
}

.admin-block-full:hover {
    background: #1a1a1a;
    border-color: #444;
}

.admin-block-full input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.admin-block-full input[type="checkbox"]:checked {
    background: #e05555;
    border-color: #e05555;
}

.admin-block-full input[type="checkbox"]:checked::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
}

.admin-block-full label {
    color: #bbb;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
}

.admin-slots-title {
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.admin-slots-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

@media (max-width: 480px) {
    .admin-slots-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.admin-slot {
    padding: 10px 6px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    text-align: center;
    color: #999;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    font-family: 'Inter', sans-serif;
}

.admin-slot:hover {
    border-color: #555;
    color: #ccc;
}

.admin-slot.available {
    background: rgba(45, 94, 63, 0.1);
    border-color: #2d5e3f;
    color: #7cc092;
}

.admin-slot.blocked {
    background: rgba(224, 85, 85, 0.15);
    border-color: #e05555;
    color: #e07070;
    text-decoration: line-through;
}

/* ---- Save Button ---- */
.admin-save-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #2d5e3f;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
}

.admin-save-btn:hover {
    background: #3a7a50;
}

.admin-save-btn:disabled {
    background: #222;
    color: #555;
    cursor: not-allowed;
}

.admin-save-btn.saving {
    background: #333;
    color: #888;
}

.admin-save-btn.saved {
    background: #1a4a2a;
    color: #7cc092;
}

/* ---- Status Messages ---- */
.admin-status {
    text-align: center;
    font-size: 0.82rem;
    margin-top: 10px;
    min-height: 1.2em;
    color: #888;
    transition: color 0.2s;
}

.admin-status.success {
    color: #7cc092;
}

.admin-status.error {
    color: #e05555;
}

/* ---- Legend ---- */
.admin-legend {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #222;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #666;
}

.admin-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.admin-legend-dot.green { background: #4a7c59; }
.admin-legend-dot.red { background: #e05555; }
.admin-legend-dot.orange { background: #e0a030; }

/* ---- Loading Spinner ---- */
.admin-loading {
    text-align: center;
    padding: 40px;
    color: #555;
}

.admin-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #333;
    border-top-color: #4a7c59;
    border-radius: 50%;
    animation: adminSpin 0.7s linear infinite;
    margin-top: 12px;
}

@keyframes adminSpin {
    to { transform: rotate(360deg); }
}

/* ---- Mobile Responsive ---- */
@media (max-width: 480px) {
    .admin-panel {
        padding: 24px 18px;
        margin: 16px auto;
        border-radius: 16px;
    }

    .admin-panel-header h2 {
        font-size: 1rem;
    }

    .admin-therapist-filter {
        flex-direction: column;
        gap: 6px;
    }

    .admin-filter-btn {
        padding: 8px;
    }
}
