/* =========================
   HUB PERSONAL WELCOME
========================= */

.hub-personal-welcome {
    margin: 24px 0 28px;
    text-align: center;
}

.hub-personal-welcome [hidden] {
    display: none !important;
}

#hubWelcomeHeading {
    margin: 0;
    font-size: clamp(19px, 2.2vw, 27px);
    font-weight: 700;
    letter-spacing: 1.2px;
    line-height: 1.4;
    color: inherit;
    text-transform: uppercase;
}

#hubWelcomeName {
    color: var(--hub-accent, #FF6D00);
}

#hubWelcomeSetup {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px;
    border: 1px solid currentColor;
    border-radius: 14px;
    text-align: center;
}

#hubWelcomeSetup h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

#hubWelcomeSetup p {
    margin: 0 0 18px;
}

#hubWelcomeForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#hubWelcomeForm label {
    text-align: left;
    font-weight: 600;
}

#hubWelcomeInput {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #888;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
}

#hubWelcomeSave {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--hub-accent, #FF6D00);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

#hubWelcomeSave:disabled {
    opacity: 0.6;
    cursor: wait;
}

#hubWelcomeError {
    color: #e65b5b;
    font-size: 14px;
}

/* =========================
   FIRST-VISIT WELCOME OVERLAY
========================= */

#hubWelcomeSetup:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 10000;
    max-width: none;
    margin: 0;
    padding: 24px;
    border: none;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
}

#hubWelcomeSetup h2,
#hubWelcomeSetup > p,
#hubWelcomeForm {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
}

#hubWelcomeSetup h2 {
    color: #fff;
}

#hubWelcomeSetup > p {
    color: #ddd;
}

#hubWelcomeForm {
    padding: 24px;
    background: #1b1e21;
    border: 1px solid #555;
    border-radius: 14px;
    color: #fff;
}

#hubWelcomeInput {
    background: #111315;
    color: #fff;
}

/* Align saved welcome greeting with the Hub page heading */
.hub-personal-welcome:has(#hubWelcomeHeading:not([hidden])) {
    position: absolute;
    top: 72px;
    left: 42%;
    right: 5%;
    margin: 0;
    text-align: center;
}

@media (max-width: 900px) {
    .hub-personal-welcome:has(#hubWelcomeHeading:not([hidden])) {
        position: static;
        margin: 16px 0;
    }
}

/* Centre Hub greeting between Suppliers and Priorities */
@media (min-width: 901px) {
    .hub-personal-welcome:has(#hubWelcomeHeading:not([hidden])) {
        left: 26%;
        right: 15%;
    }
}

@media (min-width: 901px) {
    #hubWelcomeHeading {
        max-width: 100%;
        overflow-wrap: anywhere;
        font-size: clamp(16px, 1.5vw, 27px);
    }
}
