/* ============================================================
   Horizontal Dial Navigation (Admin-only)
   Rolodex-style step bar — replaces sidebar
   All classes prefixed with cdial-
   ============================================================ */

/* ===== DIAL WRAPPER ===== */
.cdial-wrapper {
    background: linear-gradient(135deg, #181E57 0%, #0a1235 50%, #181E57 100%);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(59,130,246,0.25);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    z-index: 99;
    overflow: hidden;
    height: 80px;
    width: 100%;
    touch-action: pan-x;
    /* NO blur, NO transforms on wrapper — crystal clear HD */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

.cdial-content-push {
    /* intentionally empty — non-fixed positioning */
}

/* ===== DIAL TRACK ===== */
.cdial-track {
    display: flex;
    align-items: center;
    height: 100%;
    position: absolute;
    left: 50%;
    /* Use will-change and translateZ to force GPU layer — renders at native resolution */
    will-change: transform;
    transform: translateZ(0);
    transition: margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 60px;
    padding-right: 60px;
}

/* ===== STEP ITEM ===== */
.cdial-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 100%;
    cursor: pointer;
    transition: opacity 0.35s, transform 0s;
    position: relative;
    flex-shrink: 0;
    opacity: 0.3;
    /* NO transform: scale — it causes blurry rendering */
}
.cdial-step:hover {
    opacity: 0.5;
}

/* Step icon */
.cdial-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: opacity 0.35s, background 0.35s, border-color 0.35s, box-shadow 0.35s;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4);
}
/* SVG icons inherit stroke color from parent 'color' */
.cdial-icon svg {
    stroke: currentColor;
    width: 18px;
    height: 18px;
    /* SVGs render vector-crisp at any zoom */
    shape-rendering: geometricPrecision;
}

/* Step label */
.cdial-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    transition: opacity 0.35s, color 0.35s;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.2px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

/* ===== ACTIVE STEP ===== */
.cdial-active {
    opacity: 1 !important;
}
.cdial-active .cdial-icon {
    background: linear-gradient(135deg, #3B82F6, #0018FF) !important;
    border: 2px solid white !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    box-shadow: 0 4px 16px rgba(59,130,246,0.5);
}
.cdial-active .cdial-icon svg {
    width: 20px;
    height: 20px;
}
.cdial-active .cdial-label {
    color: white !important;
    font-weight: 700 !important;
    font-size: 12px !important;
}
/* Underline */
.cdial-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: #3B82F6;
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 10px rgba(59,130,246,0.5);
}

/* ===== ADJACENT STEPS ===== */
.cdial-adjacent {
    opacity: 0.65 !important;
}
.cdial-adjacent .cdial-icon {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
}
.cdial-adjacent .cdial-label {
    color: rgba(255,255,255,0.55);
    font-weight: 600;
}

/* ===== COMPLETED STEP ===== */
.cdial-complete {
    opacity: 0.85 !important;
}
.cdial-complete .cdial-icon {
    background: linear-gradient(145deg, #34D399 0%, #10B981 40%, #059669 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 3px 12px rgba(16,185,129,0.5);
}
.cdial-complete .cdial-icon svg {
    stroke: white;
    stroke-width: 3;
}
.cdial-complete .cdial-label {
    color: white !important;
    font-weight: 600 !important;
}
/* Completed AND active */
.cdial-complete.cdial-active .cdial-icon {
    background: linear-gradient(145deg, #34D399 0%, #10B981 40%, #059669 100%) !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(16,185,129,0.5) !important;
}
.cdial-complete.cdial-active .cdial-label {
    color: white !important;
}
.cdial-complete.cdial-active::after {
    background: #10B981 !important;
    box-shadow: 0 0 10px rgba(16,185,129,0.5) !important;
}

/* ===== CONNECTOR DOTS ===== */
.cdial-connector {
    width: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.cdial-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background 0.4s;
    box-shadow: 0 0 4px rgba(255,255,255,0.05);
}

/* ===== EDGE FADE GRADIENTS (glassmorphism) ===== */
.cdial-wrapper::before,
.cdial-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 10;
    pointer-events: none;
}
.cdial-wrapper::before {
    left: 0;
    background: linear-gradient(90deg,
        #181E57 0%,
        rgba(24,30,87,0) 100%);
}
.cdial-wrapper::after {
    right: 0;
    background: linear-gradient(-90deg,
        #181E57 0%,
        rgba(24,30,87,0) 100%);
}

/* ===== ARROW BUTTONS (glass) ===== */
.cdial-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 12px;
}
.cdial-arrow:hover {
    background: rgba(59,130,246,0.2);
    color: white;
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 4px 12px rgba(59,130,246,0.2);
    transform: translateY(-50%) scale(1.05);
}
.cdial-arrow:active {
    transform: translateY(-50%) scale(0.95);
}
.cdial-arrow-left { left: 14px; }
.cdial-arrow-right { right: 24px; }

/* ===== PANEL FOOTER (Back/Next) ===== */
.cdial-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: 20px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 0 0 16px 16px;
}

.cdial-btn-back,
.cdial-btn-next {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.cdial-btn-back {
    background: none;
    border: 2px solid rgba(0,0,0,0.1);
    color: #6b7280;
}
.cdial-btn-back:hover {
    border-color: rgba(0,0,0,0.2);
    color: #374151;
}

.cdial-btn-next {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.cdial-btn-next:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

/* ===== CONFIRMATION CHECKBOX + NEXT GROUP ===== */
.cdial-confirm-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.cdial-confirm-next {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
}
.cdial-confirm-next:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.cdial-confirm-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.06);
    border: 1.5px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s;
    flex-shrink: 0;
}
.cdial-confirm-label:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.35);
}

.cdial-confirm-checkbox {
    display: none;
}

.cdial-confirm-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(16, 185, 129, 0.4);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    flex-shrink: 0;
}
.cdial-confirm-check::after {
    content: '';
    display: none;
}

.cdial-confirm-checkbox:checked + .cdial-confirm-check {
    background: linear-gradient(135deg, #10B981, #059669);
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.cdial-confirm-checkbox:checked + .cdial-confirm-check::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

.cdial-confirm-text {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    transition: color 0.25s;
}
.cdial-confirm-checkbox:checked ~ .cdial-confirm-text {
    color: #059669;
}

/* Checked state: whole label glows */
.cdial-confirm-label:has(.cdial-confirm-checkbox:checked) {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
}

/* ===== PANEL FADE-IN ANIMATION ===== */
@keyframes cdialFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.cc-panel.active {
    animation: cdialFadeIn 0.3s ease-out;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .cdial-wrapper {
        height: 70px;
    }
    .cdial-step {
        width: 95px;
    }
    .cdial-active .cdial-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 15px !important;
    }
    .cdial-label {
        font-size: 9px;
    }
    .cdial-arrow {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    .cdial-arrow-left { left: 6px; }
    .cdial-arrow-right { right: 6px; }
    .cdial-wrapper::before,
    .cdial-wrapper::after {
        width: 60px;
    }
    .cdial-panel-footer {
        padding: 12px 16px;
    }
    .cdial-btn-back,
    .cdial-btn-next {
        padding: 8px 16px;
        font-size: 12px;
    }
}
