
:root {
    --dd-primary:      #dd002c;
    --dd-success:      #16a34a;
    --dd-warning:      #d97706;
    --dd-danger:       #dc2626;
    --dd-neutral:      #6b7280;
    --dd-text:         #111827;
    --dd-text-muted:   #6b7280;
    --dd-border:       #e5e7eb;
    --dd-radius:       8px;
}

/* ==================== CIRCULAR DUE DATES (White/Indirect) ==================== */

.due-dates-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Outer circle border */
.due-dates-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--dd-border);
    border-radius: 50%;
    z-index: 0;
}

/* Inner content container */
.due-dates-circle__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.due-dates-circle__center-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dd-text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.due-dates-circle__center-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dd-text);
}

/* ── Quadrant positioning ─────────────────────────────────── */
.due-date-item {
    position: absolute;
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
}

.due-date-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ── Top Right: Plan Due Date ────────────────────────────── */
.due-date-item--plan {
    top: -20px;
    right: -20px;
    background: #e0f2fe;
    color: #0369a1;
    border: 2px solid #0ea5e9;
}

/* ── Bottom Right: Processing Due Date ───────────────────── */
.due-date-item--processing {
    bottom: -20px;
    right: -20px;
    background: #fef3c7;
    color: #b45309;
    border: 2px solid #f59e0b;
}

/* ── Bottom Left: Done Due Date ───────────────────────────── */
.due-date-item--done {
    bottom: -20px;
    left: -20px;
    background: #dcfce7;
    color: #166534;
    border: 2px solid #22c55e;
}

/* ── Top Left: Rating Due Date ───────────────────────────── */
.due-date-item--rating {
    top: -20px;
    left: -20px;
    background: #fce7f3;
    color: #be185d;
    border: 2px solid #ec4899;
}

.due-date-item__label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
    opacity: 0.85;
}

.due-date-item__date {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
}

.due-date-item__status {
    display: block;
    font-size: 0.55rem;
    margin-top: 2px;
    opacity: 0.7;
}

/* Status indicators */
.due-date-item--overdue .due-date-item__status {
    color: var(--dd-danger);
    font-weight: 700;
}

.due-date-item--upcoming .due-date-item__status {
    color: var(--dd-warning);
}

.due-date-item--completed .due-date-item__status {
    color: var(--dd-success);
}

/* ==================== LINEAR PHASE DISPLAY (Pink Box - 3 phases) ==================== */


.due-dates-phases {
    display: flex;
    gap: 16px;
    width: 295px;
    margin: 0px 0;
    position: relative;
}

.due-dates-other{
    width: 435px !important;
}

/* Connecting line behind phases */
.due-dates-phases::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #cbd5e1, #cbd5e1);
    z-index: 0;
}

.phase-item {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Phase number circle */
.phase-item__number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 3px solid var(--dd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dd-text-muted);
    transition: all 0.2s ease;
}


.phase-item--completed .phase-item__number {
    background: var(--dd-success);
    border-color: var(--dd-success);
    color: #fff;
}


.phase-item--overdue .phase-item__number {
    background: var(--dd-danger);
    border-color: var(--dd-danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    /* animation: phase-item-overdue-blink 0.8s ease-in-out infinite; */
}
.phase-item--overdue .phase-item__date {
    font-weight: 700;
}



/* Phase content */
.phase-item__content {
    text-align: center;
    width: 100%;
}

.phase-item__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dd-text);
    margin: 0 0 4px;
}

.phase-item__title{
    text-wrap-mode: nowrap;
}
.phase-item__date{
    text-wrap-mode: nowrap;
}

.phase-item__date {
    font-size: 0.75rem;
    color: var(--dd-text-muted);
    font-weight: 500;
}

.phase-item__date--upcoming {
    color: black;
    background: var(--dd-border);
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-block;
}
.phase-item__date--overdue {
    color: black;
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-block;
    font-weight: 700;
}
.phase-item__date--completed {
    color: black;
    /* background: var(--dd-success); */
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-block;
    font-weight: 700;
}

.phase-item__label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dd-text-muted);
    margin-top: 4px;
}

/* Status badge in phase */
.phase-item__status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 4px;
}

.phase-item__status--pending {
    background: #fef3c7;
    color: #b45309;
}

.phase-item__status--completed {
    background: #dcfce7;
    color: #166534;
}

.phase-item__status--overdue {
    background: #fee2e2;
    color: #991b1b;
}

/* ==================== UTILITY CLASSES ==================== */

.due-date-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    background: #f9fafb;
    border: 2px dashed var(--dd-border);
    border-radius: var(--dd-radius);
    color: var(--dd-text-muted);
    text-align: center;
    font-size: 0.9rem;
}

.due-date-empty i {
    font-size: 2rem;
    margin-right: 12px;
    opacity: 0.5;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 640px) {
    .due-dates-circle {
        width: 160px;
        height: 160px;
    }

    .due-date-item {
        width: 60px;
        height: 60px;
        font-size: 0.65rem;
    }

    .due-date-item--plan {
        top: -15px;
        right: -15px;
    }

    .due-date-item--processing {
        bottom: -15px;
        right: -15px;
    }

    .due-date-item--done {
        bottom: -15px;
        left: -15px;
    }

    .due-date-item--rating {
        top: -15px;
        left: -15px;
    }

    .due-dates-phases {
        gap: 12px;
    }

    .phase-item__number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .phase-item__title {
        font-size: 0.75rem;
    }
}

/* ==================== PINK BOX THEME OVERRIDES ==================== */

.due-dates-phases.pink-theme {
    --dd-primary: #f5576c;
}

/* ==================== INDIRECT BOX THEME OVERRIDES ==================== */

.due-dates-circle.indirect-theme {
    --dd-primary: #4facfe;
}

.due-dates-circle.indirect-theme .due-date-item--plan {
    border-color: #0ea5e9;
    background: #e0f2fe;
}

.due-dates-circle.indirect-theme .due-date-item--rating {
    border-color: #4facfe;
    background: #e0f2fe;
}

/* ═══════════════════════════════════════════════════════════════════
   PER-STEP LAUNCHER HIGHLIGHTS (Approver → Processing page)
   ═══════════════════════════════════════════════════════════════════
   When the partial renders inside a clickable context (the
   `AllowStepClicks` ViewData flag is set) we make each phase-item
   look like an actionable chip. Completed phases collapse to a
   subtle green chip, while incomplete phases get a strong orange
   treatment + soft pulse so the approver can't miss them.
   ────────────────────────────────────────────────────────────────── */

/* Phase items become interactive buttons when wrapped in the
   .due-dates-phases--clickable / .due-dates-circle--clickable
   container that the partial emits when AllowStepClicks is true. */
.due-dates-phases--clickable .phase-item,
.due-dates-circle--clickable .phase-item {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.18s ease,
                background-color 0.2s ease, border-color 0.2s ease;
    padding: 6px 4px;
    border-radius: 8px;
}

.due-dates-phases--clickable .phase-item:hover,
.due-dates-circle--clickable .phase-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 247, 237, 0.85);
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.18);
}

.due-dates-phases--clickable .phase-item:focus,
.due-dates-circle--clickable .phase-item:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.45);
}

/* Pending / active steps pop with an orange ring + a soft pulse
   so they grab attention on the listing page. */
.due-dates-phases--clickable .phase-item--pending,
.due-dates-circle--clickable .phase-item--pending,
.due-dates-phases--clickable .phase-item--active,
.due-dates-circle--clickable .phase-item--active {
    /* background-color: #fff7ed; */
    /* border: 1px solid #f97316; */
    border-radius: 10px;
    /* animation: phase-attention-blink 1.2s ease-in-out infinite; */
}

.due-dates-phases--clickable .phase-item--pending .phase-item__number,
.due-dates-circle--clickable .phase-item--pending .phase-item__number,
.due-dates-phases--clickable .phase-item--active .phase-item__number,
.due-dates-circle--clickable .phase-item--active .phase-item__number {
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

@keyframes phase-attention-blink {
    0%, 100% {
        /* box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.0),
                    0 0 0 4px rgba(249, 115, 22, 0.18); */
        transform: scale(1);
        /* background: rgba(255, 247, 237, 0.5); */
    }
    50% {
        /* box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.0),
                    0 0 0 10px rgba(249, 115, 22, 0.4); */
        transform: scale(1.05);
        /* background: rgba(255, 237, 209, 0.9); */
    }
}

/* Completed phases should NOT pulse — they're done. */
.due-dates-phases--clickable .phase-item--completed,
.due-dates-circle--clickable .phase-item--completed {
    /* background-color: #f0fdf4; */
    /* border: 1px solid #16a34a; */
    border-radius: 10px;
    animation: none;
    /* opacity: 0.5; */
}

/* Cursor on overdue incomplete phases — blink animation red. */
.due-dates-phases--clickable .phase-item--overdue,
.due-dates-circle--clickable .phase-item--overdue {
    /* background-color: #fef2f2;
    border: 1px solid #dc2626; */
    border-radius: 10px;
    animation: phase-overdue-blink 0.8s ease-in-out infinite;
}

@keyframes phase-overdue-blink {
    0%, 100% {
       
        transform: scale(1);
    
    }
    50% {
      
        transform: scale(1.1);
     
    }
}

.phase-item__date--upcoming  { color: black; }
.phase-item__date--overdue   { color: black; }
.phase-item__date--completed {
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   INDIRECT PLAN PHASE — steady warm tone (HR-owned, read-only)
   ═══════════════════════════════════════════════════════════════════
   On Indirect forms, HR manages Plan entirely (BulkUpdatePlanDueDateAsync).
   The .phase-item--readonly modifier is emitted by _DueDatesCircle /
   _DueDatesPhases when BoxType == InDirect inside a clickable
   launcher context. Override the status-driven state colors so
   Plan reads as a steady warm chip regardless of whether it's
   --active / --completed / --overdue. The number bubble + date
   pill both land in the amber family for visual consistency.
   ────────────────────────────────────────────────────────────────── */
.due-dates-phases--clickable .phase-item--readonly,
.due-dates-circle--clickable .phase-item--readonly,
.due-dates-phases--clickable .phase-item--readonly.phase-item--active,
.due-dates-circle--clickable .phase-item--readonly.phase-item--active,
.due-dates-phases--clickable .phase-item--readonly.phase-item--completed,
.due-dates-circle--clickable .phase-item--readonly.phase-item--completed,
.due-dates-phases--clickable .phase-item--readonly.phase-item--overdue,
.due-dates-circle--clickable .phase-item--readonly.phase-item--overdue,
.due-dates-phases--clickable .phase-item--readonly.phase-item--pending,
.due-dates-circle--clickable .phase-item--readonly.phase-item--pending {
    /* background-color: #fff4e0; */
    /* border: 1px solid #fdba74; */
    border-radius: 10px;
    /* animation: none; */
    /* disable pointer affordance — Plan on Indirect is HR-owned */
    cursor: default;
}

.due-dates-phases--clickable .phase-item--readonly:hover,
.due-dates-circle--clickable .phase-item--readonly:hover,
.due-dates-phases--clickable .phase-item--readonly:focus,
.due-dates-circle--clickable .phase-item--readonly:focus {
    transform: none;
    background-color: #fff4e0;
    box-shadow: 0 0 0 3px rgba(253, 186, 116, 0.35);
}

.due-dates-phases--clickable .phase-item--readonly .phase-item__number,
.due-dates-circle--clickable .phase-item--readonly .phase-item__number {
    /* background: #f59e0b; */
    /* border-color: #f59e0b; */
    /* color: #fff; */
    box-shadow: none;
}

/* .due-dates-phases--clickable .phase-item--readonly .phase-item__title,
.due-dates-circle--clickable .phase-item--readonly .phase-item__title {
    color: #9a3412;
} */

/* .phase-item--overdue .phase-item__title {
    color: var(--dd-danger);
} */

.due-dates-phases--clickable .phase-item--readonly .phase-item__date,
.due-dates-circle--clickable .phase-item--readonly .phase-item__date {
    /* Override any --completed / --upcoming / --overdue chip pill
       so the date always lands on the warm card without ever
       flipping to red or green. */
    /* color: #9a3412; */
    /* background: #fed7aa; */
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-block;
    font-weight: 600;
}
