/* 
   ATICO34 PEOPLE OS - CANDIDATE PORTAL 
   Ultra-Thin & Elegant | Porcelain/Carbon
*/

:root {
    --bg-porcelain: #F9FAFB;
    --text-carbon: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #9CA3AF;
    --border-hairline: #E5E7EB;
    --input-focus: #000000;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-porcelain);
    overflow: hidden;
}

/* LAYOUT */
.portal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    height: 100vh;
    /* fallback */
    width: 100vw;
}

@supports (height: 100dvh) {
    .portal-body {
        height: 100dvh;
    }
}

.portal-card {
    width: 100%;
    max-width: 480px;
    height: 100%;
    max-height: 900px;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
}

@media(min-width: 600px) {
    .portal-card {
        height: 90vh;
        max-height: 800px;
        border-radius: 24px;
    }
}

@media(max-width: 599px) {
    .card-header {
        padding-top: 48px;
    }

    .card-content {
        padding-top: 16px;
    }

    .card-footer {
        padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    }
}

/* HEADER */
.card-header {
    padding: 32px 32px 16px;
    text-align: left;
}

.stepper-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    height: 4px;
}

.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-hairline);
    transition: all 0.4s var(--ease-out);
}

.dot.active {
    background: var(--text-carbon);
    width: 24px;
    border-radius: 4px;
}

.dot.completed {
    background: var(--text-carbon);
}

.h1-portal {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-carbon);
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    transition: opacity 0.3s;
}

.desc-portal {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

/* CONTENT */
.card-content {
    flex: 1;
    padding: 0 32px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.step-container {
    display: none;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.step-container.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.step-container.flex-center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* FORM ELEMENTS */
.label-mono {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-carbon);
    font-weight: 600;
    text-align: left;
    width: 100%;
}

.input-lg {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border-hairline);
    padding: 12px 0;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-carbon);
    background: transparent;
    border-radius: 0;
    outline: none;
    transition: border-color 0.3s;
}

.input-lg:focus {
    border-bottom-color: var(--input-focus);
}

.input-lg::placeholder {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.input-lg:disabled {
    background-color: transparent;
    color: var(--text-carbon);
    opacity: 1;
    border-bottom: 1px solid var(--border-hairline);
    -webkit-text-fill-color: var(--text-carbon);
}

.input-code {
    text-align: center;
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: none;
    background: transparent;
    color: var(--text-carbon);
    font-weight: 600;
    width: 100%;
    padding: 16px;
    outline: none;
}

/* OPTIONS (New Dot Style) */
.btn-option {
    padding: 18px 0;
    width: 100%;
    text-align: left;
    font-size: 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-hairline);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding-left: 0px;
}

.btn-option:hover {
    color: var(--text-carbon);
}

/* Selected state: Black text + Dot */
.btn-option.selected {
    color: var(--text-carbon);
    font-weight: 500;
    padding-left: 16px;
    /* Space for dot */
}

.btn-option.selected::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-carbon);
    font-size: 20px;
    line-height: 0;
}

/* Chips for Multi-Select */
.sub-options-container {
    padding: 16px 0 0 16px;
    animation: slideDown 0.3s var(--ease-out);
    border-left: 1px solid var(--border-hairline);
    margin-left: 7px;
    margin-bottom: 16px;
}

.chip {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-hairline);
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0;
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.chip.selected {
    background: var(--text-carbon);
    color: #fff;
    border-color: var(--text-carbon);
}

/* SLIDER */
.slide-container {
    width: 100%;
    height: 56px;
    background: #F3F4F6;
    border-radius: 28px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    overflow: hidden;
}

.slide-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: opacity 0.2s;
}

.slide-handle {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    left: 4px;
    top: 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: transform 0.1s;
}

/* FOOTER */
.card-footer {
    padding: 24px 32px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    /* Ensure bg covers content if needed */
}

.btn-icon-thin {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-hairline);
    background: #fff;
    color: var(--text-carbon);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-thin:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--border-hairline);
}

.btn-icon-thin.primary {
    background: var(--text-carbon);
    color: #fff;
    border-color: var(--text-carbon);
}

.btn-icon-thin.primary:hover:not(:disabled) {
    transform: scale(1.05);
}

/* SUCCESS CHECKMARK */
.checkmark-container {
    width: 52px;
    height: 52px;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: #10B981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #10B981;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #fff;
    width: 90%;
    max-width: 800px;
    /* Wider */
    max-height: 85vh;
    /* Max height to force scroll */
    border-radius: 16px;
    padding: 0;
    /* Removing padding from card */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Hide overflow of card, scroll body */
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-hairline);
    flex-shrink: 0;
}

.modal-body {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    overflow-y: auto;
    /* Scrollable body */
    padding: 24px 32px;
    flex: 1;
}

.modal-body a {
    color: inherit;
    text-decoration: underline;
}

/* Neutral links */
.btn-close-modal {
    width: 100%;
    padding: 20px;
    border: none;
    background: var(--bg-porcelain);
    color: var(--text-carbon);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-top: 1px solid var(--border-hairline);
    flex-shrink: 0;
    /* Keep button visible */
}


/* TIMELINE */
.timeline {
    margin-top: 24px;
    padding-left: 8px;
}

.tl-item {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 0px;
}

.tl-item:last-child {
    margin-bottom: 0;
}

.tl-line {
    position: absolute;
    left: 7px;
    top: 24px;
    bottom: -40px;
    width: 2px;
    background: var(--border-hairline);
    z-index: 0;
}

.tl-item:last-child .tl-line {
    display: none;
}

.tl-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--border-hairline);
    z-index: 1;
    margin-top: 4px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.tl-item.active .tl-dot {
    background: var(--text-carbon);
    border-color: var(--text-carbon);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.1);
}

.tl-item.completed .tl-dot {
    background: var(--text-carbon);
    border-color: var(--text-carbon);
}

.tl-content {
    flex: 1;
}

.tl-date {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.tl-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-carbon);
}

.tl-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}

/* FUTURE TIMELINE STEP */
.tl-item.future .tl-dot {
    background: #fff;
    border-color: var(--border-hairline);
    border-style: dashed;
}

.tl-item.future .tl-content {
    opacity: 0.45;
}

.tl-item.future .tl-line {
    border-left: 2px dashed var(--border-hairline);
    background: none;
    width: 0;
    left: 8px;
}

/* STATUS CARD */
.status-card {
    background: #fff;
    border: 1px solid var(--border-hairline);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 32px;
    transition: transform 0.2s;
}

.status-card:active {
    transform: scale(0.98);
}

/* RESOURCE LIST */
.resource-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-hairline);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.resource-item:hover {
    border-color: var(--text-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.resource-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-porcelain);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* UTILS */
.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge.black {
    background: var(--text-carbon);
    color: #fff;
}