/* 체험단플랫폼 - 공통 사용자 헤더. 관리자 CSS와 독립. */
.cp-uheader,
.cp-uheader * {
    box-sizing: border-box;
}

.cp-uheader {
    position: relative;
    z-index: 100;
    width: 100%;
    border-bottom: 1px solid #e4e9f0;
    background: #fff;
    color: #1c2940;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}

.cp-uheader-inner {
    width: min(1120px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
}

.cp-uheader a {
    color: inherit;
    text-decoration: none;
}

.cp-uh-brand {
    display: inline-flex;
    flex: none;
    gap: 9px;
    align-items: center;
    white-space: nowrap;
}

.cp-uh-symbol {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: #f65d4a;
    color: #fff;
    font-size: 17px;
    font-weight: 850;
}

.cp-uh-brand-name {
    color: #1b263e;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 850;
    letter-spacing: -0.045em;
}

.cp-uheader .cp-uh-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 auto;
    gap: 15px;
    min-width: 0;
}

.cp-uheader .cp-uh-nav > a {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: 42px;
    padding: 5px 0;
    color: #293349;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: -0.035em;
    white-space: nowrap;
}

.cp-uheader .cp-uh-nav > a:hover,
.cp-uheader .cp-uh-nav > a:focus-visible,
.cp-uheader .cp-uh-nav > a[aria-current="page"] {
    color: #ef523d;
}

.cp-uh-account {
    display: inline-flex;
    flex: none;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.cp-uh-member {
    display: inline-block;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #68758b;
    font-size: 12px;
    font-weight: 700;
}

.cp-uh-logout {
    margin: 0;
}

.cp-uheader .cp-uh-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 37px;
    width: auto;
    padding: 7px 13px;
    border: 1px solid #dfe5ed;
    border-radius: 9px;
    background: #fff;
    color: #26334a;
    font-family: inherit;
    line-height: 1.4;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.cp-uheader .cp-uh-account-button:hover {
    border-color: #f65d4a;
    color: #e44d3a;
}

.cp-uheader .cp-uh-join-button {
    border-color: #f65d4a;
    background: #f65d4a;
    color: #fff;
}

.cp-uheader .cp-uh-nav > .cp-uh-mobile-account {
    display: none;
}

.cp-uh-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 8px 11px;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    background: #fff;
    color: #26334a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cp-uh-toggle-bars {
    display: grid;
    gap: 4px;
    width: 17px;
}

.cp-uh-toggle-bars i {
    display: block;
    width: 17px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.cp-uheader a:focus-visible,
.cp-uheader button:focus-visible {
    outline: 3px solid rgba(246, 93, 74, .28);
    outline-offset: 2px;
}

@media (max-width: 1110px) {
    .cp-uheader-inner { gap: 16px; }
    .cp-uheader .cp-uh-nav { gap: 12px; }
    .cp-uh-member { max-width: 100px; }
}

@media (max-width: 1020px) {
    .cp-uheader-inner {
        position: relative;
        min-height: 68px;
        flex-wrap: wrap;
        gap: 10px;
        padding: 11px 0;
    }

    .cp-uh-brand { margin-right: auto; }
    .cp-uh-brand-name { font-size: 18px; }

    .cp-uh-toggle {
        display: inline-flex;
        order: 2;
    }

    .cp-uh-account {
        order: 1;
    }

    .cp-uh-member { max-width: 110px; }

    .cp-uheader .cp-uh-nav {
        order: 3;
        display: none;
        flex: 0 0 100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 9px 0;
        border-top: 1px solid #edf0f4;
    }

    .cp-uheader.is-menu-open .cp-uh-nav {
        display: flex;
    }

    .cp-uheader .cp-uh-nav > a {
        min-height: 43px;
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 14px !important;
        white-space: normal;
    }

    .cp-uheader .cp-uh-nav > a:hover {
        background: #fff4f1;
    }
}

@media (max-width: 590px) {
    .cp-uheader-inner {
        width: calc(100% - 28px);
        min-height: 62px;
        gap: 9px;
    }

    .cp-uh-symbol { width: 31px; height: 31px; }
    .cp-uh-brand-name { font-size: 16px; }
    .cp-uh-account { gap: 6px; }
    .cp-uh-member { display: none; }
    .cp-uheader .cp-uh-account-button { min-height: 34px; padding: 6px 9px; font-size: 11px; }
    .cp-uh-toggle { padding: 7px 9px; }
    .cp-uh-toggle > span:last-child { display: none; }
    .cp-uh-toggle { order: 2; }
}

@media (max-width: 390px) {
    .cp-uh-brand-name { font-size: 15px; }
    .cp-uh-symbol { width: 29px; height: 29px; }
    .cp-uheader-inner { gap: 7px; }
}

/* STEP 8-26: uploaded logo replaces the hardcoded C mark. */
.cp-uheader .cp-uh-custom-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 155px;
    max-height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}
@media (max-width: 600px) {
    .cp-uheader .cp-uh-custom-logo { max-width: 105px; max-height: 34px; }
}

/* STEP 8-27: public-site header logo only (does not affect admin sidebar). */
.cp-uheader .cp-uh-brand > .cp-uh-custom-logo {
    display: block;
    flex: 0 1 auto;
    width: auto;
    height: auto;
    max-width: min(180px, 38vw);
    max-height: 44px;
    object-fit: contain;
    vertical-align: middle;
}
@media (max-width: 590px) {
    .cp-uheader .cp-uh-brand > .cp-uh-custom-logo {
        max-width: min(105px, 30vw);
        max-height: 33px;
    }
}
