/* ============================================================
   HRDB Talent Public — Centralized Stylesheet
   ============================================================
   COLORS — edit here to change globally:
     --color-primary      #1a9688   teal (header, active steps, focus)
     --color-primary-dark #157a6e   teal hover
     --color-orange       #e05500   CTA buttons, accent text
     --color-orange-dark  #c04800   CTA hover
     --color-gold         #f0b429   star / complete icon
     --color-done         #aaaaaa   completed step circles
     --color-gray         #888888   secondary buttons / upload
     --color-gray-dark    #666666   secondary hover
     --color-error        #e53935   required mark / validation
     --color-text         #333333   body text
     --color-border       #cccccc   input borders
   ============================================================ */

:root {
    --color-primary: #00a99d;
    --color-primary-dark: #157a6e;
    --color-orange: #f15a24;
    --color-orange-dark: rgb(202, 78, 0);
    --color-gold: #f0b429;
    --color-done: #aaaaaa;
    --color-gray: #888888;
    --color-gray-light: #f2f2f2;
    --color-gray-dark: #666666;
    --color-error: #e53935;
    --color-text: #555555;
    --color-border: #b4b4b4;

    --radius-input: 3px;
    --radius-btn: 50px;
    --radius-toggle: 30px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: var(--color-text);
}

/* ===== HEADER ===== */
.hrdb-header {
    background-color: var(--color-primary);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 70px;
}

/* .hrdb-logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
} */

.hrdb-logo-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.hrdb-logo-text {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.hrdb-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.hrdb-menu-btn > span {
    font-size: 0.55rem;
    letter-spacing: 1px;
    color: #eeeeee;
}
.hrdb-menu-lines {
    display: flex;
    flex-direction: column;
    gap: 6.5px;
}
.hrdb-menu-line {
    width: 28px;
    height: 1px;
    background: #eeeeee;
    border-radius: 2px;
}

/* ===== LAYOUT ===== */
.hrdb-content {
    background: #ffffff;
    min-height: calc(100vh - 70px);
}
.hrdb-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

/* ===== PAGE TITLE ===== */
.hrdb-page-title {
    font-size: 1.85rem;
    font-weight: 500;
    letter-spacing: 5px;
    text-align: center;
    padding: 28px 0 4px;
    color: var(--color-text);
}

/* ===== STEPPER ===== */
.hrdb-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 0 38px; /* extra bottom so absolutely-positioned labels aren't clipped */
    transform-origin: top center;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Fixed to circle width — label overflows without pushing connectors */
    width: 44px;
    flex-shrink: 0;
    position: relative;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.8px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-primary);
    background: white;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.step-circle.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.step-circle.done {
    background: var(--color-done);
    border-color: var(--color-done);
    color: white;
}

/* Label is absolutely positioned below the circle so it
   does NOT affect the width of .step-item or push connectors */
.step-label {
    position: absolute;
    top: 50px; /* sits just below the 44px circle */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--color-primary);
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}
.step-label.done {
    color: var(--color-done);
}

.step-connector {
    width: 28px;
    height: 2px;
    background: var(--color-border);
    margin-top: 21px;
    flex-shrink: 0;
}
.step-connector.active {
    background: var(--color-done);
}

/* Scale the entire stepper row down on narrow screens */
@media (max-width: 400px) {
    .hrdb-stepper {
        transform: scale(0.82);
        padding-bottom: 28px;
    }
}
@media (max-width: 340px) {
    .hrdb-stepper {
        transform: scale(0.7);
        padding-bottom: 20px;
    }
}

/* ===== FORM GROUPS ===== */
.hrdb-form-container {
    padding: 18px;
}

.hrdb-form-group {
    margin-bottom: 12px;
}

.hrdb-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text);
    margin-bottom: 2px;
    font-weight: 400;
}
.hrdb-label .req {
    color: var(--color-error);
    margin-left: 2px;
}

/* Text / Email / Password / Textarea inputs */
.hrdb-input {
    width: 100%;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-input);
    padding: 6px 15px;
    font-size: 0.85rem;
    font-family: "Lato", sans-serif;
    background: white;
    outline: none;
    transition: border-color 0.2s;
    color: var(--color-text);
    -webkit-appearance: none;
}
.hrdb-input::placeholder {
    color: #bbb;
}
.hrdb-input:focus {
    border-color: var(--color-primary);
}

/* Select dropdowns */
.hrdb-select {
    width: 100%;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-input);
    padding: 6px 15px;
    font-size: 1rem;
    font-family: "Lato", sans-serif;
    background: white
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M0 0l5.5 7 5.5-7z' fill='%23888'/%3E%3C/svg%3E")
        no-repeat right 14px center;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    color: #999;
    transition: border-color 0.2s;
}
.hrdb-select:focus {
    border-color: var(--color-primary);
}
.hrdb-select option {
    color: var(--color-text);
}

/* Date row (Day/Month/Year) */
.hrdb-date-row {
    display: flex;
    gap: 10px;
}
.hrdb-date-row .hrdb-select {
    flex: 1;
}

/* ===== TOGGLE BUTTONS ===== */
.toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.toggle-btn {
    border: 1.5px solid #6b6b6b;
    border-radius: var(--radius-toggle);
    padding: 6px 18px;
    background: var(--color-gray-light);
    color: #444;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: "Lato", sans-serif;
    transition:
        border-color 0.15s,
        background 0.15s,
        color 0.15s;
    -webkit-appearance: none;
}
.toggle-btn:hover {
    border-color: var(--color-primary);
}
.toggle-btn.selected {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ===== CTA / ACTION BUTTONS ===== */
.btn-hrdb-orange {
    background: var(--color-orange);
    color: white;
    border: none;
    border-radius: var(--radius-btn);
    box-shadow: 0px 0px 19px -3px rgba(0, 0, 0, 0.72);
    padding: 12px 28px;
    font-size: 1.6rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 2px;
    transition: background 0.15s;
}
.btn-hrdb-orange:hover,
.btn-hrdb-orange:focus {
    background: var(--color-orange-dark);
    color: white;
    text-decoration: none;
}

.btn-hrdb-gray {
    background: var(--color-gray);
    color: white;
    border: none;
    border-radius: var(--radius-btn);
    box-shadow: 0px 0px 19px -3px rgba(0, 0, 0, 0.72);
    padding: 12px 20px;
    font-size: 1.6rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 2px;
    transition: background 0.15s;
}
.btn-hrdb-gray:hover,
.btn-hrdb-gray:focus {
    background: var(--color-gray-dark);
    color: white;
    text-decoration: none;
}

/* Arrow icons inside buttons */
.btn-arrow {
    height: 14px;
    width: auto;
    display: block;
    position: absolute;
    right: 20px;
}
.btn-arrow-left {
    height: 14px;
    width: auto;
    display: block;
}
.btn-arrow.left {
    height: 1px;
    width: auto;
    display: block;
    position: absolute;
}

/* Back + Proceed row — fixed to bottom of viewport */
.btn-row {
    display: flex;
    gap: 14px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 24px 28px;
    background: white;
    z-index: 50;
    max-width: 480px;
    margin: 0 auto;
}
.btn-row-complete {
    display: flex;
    gap: 14px;
    padding: 12px 24px 28px;
    background: white;
    max-width: 480px;
    margin: 0 auto;
}
.btn-row .btn-hrdb-gray {
    flex: 0 0 auto;
}
.btn-row .btn-hrdb-orange {
    flex: 1;
}
.btn-row-complete .btn-hrdb-orange {
    flex: 1;
}
.btn-row-complete .btn-hrdb-gray {
    flex: 1;
}

/* ===== TAP LABEL (landing page button) ===== */
.tap-label {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 3px 8px;
    letter-spacing: 1px;
}

/* ===== STAR / COMPLETE ICON ===== */
.hrdb-star-icon {
    text-align: center;
    padding: 44px 0 2px;
}
.hrdb-star-icon svg {
    width: 170px;
    height: 170px;
}

/* ===== UPLOAD BUTTON ===== */
.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-gray);
    color: white;
    border: none;
    border-radius: var(--radius-toggle);
    padding: 6px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: "Lato", sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}
.upload-btn:hover {
    background: var(--color-gray-dark);
}

.picture-preview {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
    display: none;
    margin-top: 12px;
}

/* ===== ADD MORE BUTTON ===== */
.add-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--color-gray);
    font-size: 0.85rem;
    font-family: "Lato", sans-serif;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 6px;
    width: 100%;
}
.add-more-circle {
    width: 30px;
    height: 30px;
    background: var(--color-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}
.extra-cert {
    margin-top: 10px;
}

/* ===== VALIDATION ===== */
.hrdb-error {
    color: var(--color-error);
    font-size: 0.8rem;
    margin-top: 4px;
}
.input-error {
    border-color: var(--color-error) !important;
}

.hrdb-alert-error {
    background: #fff3f3;
    border: 1px solid var(--color-error);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
}
.hrdb-alert-error ul {
    margin: 0;
    padding-left: 18px;
    color: var(--color-error);
    font-size: 0.85rem;
}

.hrdb-alert-success {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    color: #2e7d32;
    font-size: 0.85rem;
}

/* ===== COMPLETE / THANK YOU PAGES ===== */

.hrdb-complete-container {
    margin-top: 42px;
}
.hrdb-complete-container.pending {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: max-content;
    gap: 5rem;
}

.hrdb-complete-title {
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1;
    color: var(--color-primary);
    text-align: center;
    padding: 20px 0 16px;
}
.hrdb-complete-body {
    color: var(--color-orange);
    font-size: 1.1rem;
    line-height: 1.1;
    text-align: center;
    padding: 10px;
    font-weight: 400;
}
