/**
 * OEP Operating Level — Styles
 *
 * @author Fudo
 * @date   2025-04-30
 * @desc   Styles for the [oep_operating_level] shortcode.
 *         Matches the IOEM design system: progress bar with arrow steps,
 *         color-coded alert panels, accessible focus states.
 */

/* ─────────────────────────────────────────────────────────────────────────────
   Color Tokens
───────────────────────────────────────────────────────────────────────────── */
:root {
    --oep-blue:         #284291;
    --oep-blue-light:   #284291;
    --oep-green:        #276319;
    --oep-green-light:  #276319;
    --oep-yellow:       #F7EC13;
    --oep-yellow-dark:  #a07800;
    --oep-red:          #F05323;
    --oep-red-light:    #f05323;
    --oep-white:        #ffffff;
    --oep-gray-muted:   rgba(255, 255, 255, 0.55);
    --oep-radius:       4px;
    --oep-btn-radius:   24px;
    --oep-font:         inherit;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Wrapper
───────────────────────────────────────────────────────────────────────────── */
.oep-operating-level {
    font-family: var(--oep-font);
    width: 100%;
    overflow: hidden;
}
 
/* ─────────────────────────────────────────────────────────────────────────────
   Progress Bar
───────────────────────────────────────────────────────────────────────────── */
.oep-progress-bar {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 48px;
    overflow: visible;
}
 
.oep-step {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 10px 32px 10px 40px;
    font-size: 16px;
    font-weight: 100;
    color: var(--oep-white);
    text-align: center;
    z-index: 1;
}

.oep-panel__content a.its-btn-light {
	background: var(--oep-yellow) !important; 
	color: #1a1a1a !important;
}
 
/* Each step increments z-index so left arrow covers the step to its left */
.oep-progress-bar .oep-step:nth-child(1) { z-index: 4; }
.oep-progress-bar .oep-step:nth-child(2) { z-index: 3; }
.oep-progress-bar .oep-step:nth-child(3) { z-index: 2; }
.oep-progress-bar .oep-step:nth-child(4) { z-index: 1; }
 
/* First step has no left indent */
.oep-step:first-child {
    padding-left: 16px;
}

 
/* ── Right-pointing chevron arrow via ::after ── */
.oep-step::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    width: 0;
    height: 0;
    border-top:    24px solid transparent;
    border-bottom: 24px solid transparent;
    border-left:   20px solid transparent; /* color set per-level below */
    z-index: 5;
    pointer-events: none;
}
 
/* Last step has no arrow */
.oep-step:last-child::after {
    display: none;
}
 
/* Color variants — step background */
.oep-step.oep-level--blue   { background-color: var(--oep-blue); }
.oep-step.oep-level--green  { background-color: var(--oep-green); }
.oep-step.oep-level--yellow { background-color: var(--oep-yellow); color: #1a1a1a; }
.oep-step.oep-level--red    { background-color: var(--oep-red); color: #000 }
 
/* Arrow color matches step background */
.oep-step.oep-level--blue::after   { border-left-color: var(--oep-blue); }
.oep-step.oep-level--green::after  { border-left-color: var(--oep-green); }
.oep-step.oep-level--yellow::after { border-left-color: var(--oep-yellow); }
.oep-step.oep-level--red::after    { border-left-color: var(--oep-red); }
 
/* Active step brightness boost */
.oep-step--active.oep-level--blue   { background-color: var(--oep-blue-light); }
.oep-step--active.oep-level--green  { background-color: var(--oep-green-light); }
.oep-step--active.oep-level--red    { background-color: var(--oep-red-light); }
 
.oep-step--active.oep-level--blue::after   { border-left-color: var(--oep-blue-light); }
.oep-step--active.oep-level--green::after  { border-left-color: var(--oep-green-light); }
.oep-step--active.oep-level--red::after    { border-left-color: var(--oep-red-light); }
 
/* Step label sits above the pseudo-elements */
.oep-step__label {
    position: relative;
    z-index: 1;
    line-height: 1.2;
}
 
/* Remove the old span-based arrow — no longer needed */
.oep-step__arrow {
    display: none;
}
 
/* ─────────────────────────────────────────────────────────────────────────────
   Alert Panels
───────────────────────────────────────────────────────────────────────────── */
.oep-panels {
    position: relative;
}
 
/* All panels hidden by default */
.oep-panel {
    display: none;
    align-items: center;
    gap: 50px;
    padding: 50px 50px;
    border-radius: 0 0 var(--oep-radius) var(--oep-radius);
    color: var(--oep-white);
}
 
/* Only the active panel is shown */
.oep-panel--active {
    display: flex;
}
 
/* Panel color variants */
.oep-panel.oep-level--blue   { background-color: var(--oep-blue); }
.oep-panel.oep-level--green  { background-color: var(--oep-green); }
.oep-panel.oep-level--yellow { background-color: var(--oep-yellow); color: #1a1a1a; }
.oep-panel.oep-level--red    { background-color: var(--oep-red); }
 
/* Panel icon */
.oep-panel__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
}
 
.oep-panel__icon svg {
    width: 52px;
    height: 52px;
    fill: var(--oep-white);
    opacity: 0.9;
}
 
.oep-panel__icon-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
}
 
.oep-panel.oep-level--yellow .oep-panel__icon svg {
    fill: #5a3e00;
}
 
/* Panel content */
.oep-panel__content {
    flex: 1;
}
 
.oep-panel__title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    color: var(--oep-white);
    line-height: 1.3;
}
 
.oep-panel.oep-level--yellow .oep-panel__title {
    color: #1a1a1a;
}
 
.oep-panel__description {
    margin: 0 0 16px;
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 680px;
}
 
.oep-panel.oep-level--yellow .oep-panel__description {
    color: #2a2a2a;
}
 
/* Learn More button */
.oep-panel__btn {
    display: inline-block;
    padding: 9px 24px;
    background-color: var(--oep-white);
    color: #1a1a1a;
    border-radius: var(--oep-btn-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}
 
.oep-panel__btn:hover {
    background-color: #f0f0f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: #1a1a1a;
}
 
.oep-panel__btn:focus-visible {
    outline: 3px solid var(--oep-white);
    outline-offset: 3px;
}
 
.oep-panel__btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}
 
/* ─────────────────────────────────────────────────────────────────────────────
   Responsive
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .oep-progress-bar {
        flex-direction: column;
    }
 
    .oep-step {
        justify-content: flex-start;
        padding: 10px 16px;
    }
 
    .oep-step__arrow {
        display: none;
    }
 
    .oep-panel--active {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 16px;
    }
 
    .oep-panel__icon {
        width: 48px;
        height: 48px;
    }
 
    .oep-panel__icon svg {
        width: 40px;
        height: 40px;
    }
 
    .oep-panel__title {
        font-size: 1.25rem;
    }
 
    .oep-panel__description {
        font-size: 16px;
    }
}