/* ==========================================================================
   Sewer24 Sticky Bottom Call Bar
   ========================================================================== */

:root {
    /* 사이트 팔레트와 일치: primary #F82F72 / primary-dark #7A123E / primary-light #FFE3EE */
    --dd-sb-top-bg: #7A123E;             /* 와인 (color-primary-dark) */
    --dd-sb-top-fg: #FFE3EE;             /* 파스텔 핑크 텍스트 */
    --dd-sb-top-sep: rgba(255, 227, 238, 0.38);
    --dd-sb-bottom-bg: #FFEAF3;          /* 파스텔 핑크 폼 바 */
    --dd-sb-bottom-fg: #5A0F2C;          /* 깊은 와인 텍스트 */
    --dd-sb-cta-bg: #F82F72;             /* 액션 버튼: 메인 핫핑크 */
    --dd-sb-cta-fg: #ffffff;
    --dd-sb-cta-glow: rgba(248, 47, 114, 0.28);
    --dd-sb-input-bg: #ffffff;
    --dd-sb-input-fg: #5A0F2C;
    --dd-sb-input-ph: #B58095;
    --dd-sb-input-border: #F4B6CE;
    --dd-sb-input-focus: #F82F72;
    --dd-sb-radius: 8px;                 /* 파스텔에 어울리는 부드러운 라운딩 */
    --dd-sb-h-top: 40px;
    --dd-sb-h-bottom: 64px;
}

.dd-stickybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    font-size: 14px;
    line-height: 1.4;
    color: var(--dd-sb-top-fg);
    box-shadow: 0 -8px 22px rgba(122, 18, 62, 0.18);
}

.dd-stickybar a {
    color: inherit;
    text-decoration: none;
}

.dd-stickybar__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- 상단 다크 strip --- */
.dd-stickybar__top {
    background: var(--dd-sb-top-bg);
    color: var(--dd-sb-top-fg);
    min-height: var(--dd-sb-h-top);
    display: flex;
    align-items: center;
}

.dd-stickybar__top .dd-stickybar__inner {
    justify-content: center;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 13.5px;
}

.dd-stickybar__brand {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.dd-stickybar__sep {
    color: var(--dd-sb-top-sep);
    user-select: none;
}

.dd-stickybar__top a {
    color: var(--dd-sb-top-fg);
    border-bottom: 1px dotted rgba(255, 227, 238, 0.45);
}

.dd-stickybar__top a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

/* --- 하단 블루 폼 바 --- */
.dd-stickybar__bottom {
    background: var(--dd-sb-bottom-bg);
    color: var(--dd-sb-bottom-fg);
    min-height: var(--dd-sb-h-bottom);
    display: flex;
    flex-direction: column;
    margin: 0;
}

.dd-stickybar__bottom .dd-stickybar__inner {
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 12px;
    flex-wrap: nowrap;
}

/* 무료 전화상담 + 번호 묶음 */
.dd-stickybar__call {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--dd-sb-bottom-fg);
    font-weight: 800;
    border-bottom: none !important;
    white-space: nowrap;
    flex: 0 0 auto;
}

.dd-stickybar__call-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.92;
}

.dd-stickybar__call-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F82F72;
    color: #fff;
    box-shadow: 0 2px 6px rgba(248, 47, 114, 0.32);
}

.dd-stickybar__call-num {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    color: #7A123E;
}

/* 입력 */
.dd-stickybar__input {
    flex: 1 1 200px;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    background: var(--dd-sb-input-bg);
    color: var(--dd-sb-input-fg);
    border: 1px solid var(--dd-sb-input-border);
    border-radius: var(--dd-sb-radius);
    font-size: 14px;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(122, 18, 62, 0.05) inset;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dd-stickybar__input::placeholder {
    color: var(--dd-sb-input-ph);
}

.dd-stickybar__input:focus {
    border-color: var(--dd-sb-input-focus);
    box-shadow: 0 0 0 3px rgba(248, 47, 114, 0.18);
}

/* 전송 버튼 */
.dd-stickybar__submit {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 24px;
    background: var(--dd-sb-cta-bg);
    color: var(--dd-sb-cta-fg);
    border: 0;
    border-radius: var(--dd-sb-radius);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    position: relative;
    transition: transform 0.06s ease, filter 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    box-shadow: 0 3px 10px var(--dd-sb-cta-glow);
}

.dd-stickybar__submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 5px 14px var(--dd-sb-cta-glow);
}

.dd-stickybar__submit:active {
    transform: translateY(1px);
}

.dd-stickybar__submit:disabled {
    cursor: progress;
    filter: brightness(0.92);
}

.dd-stickybar.is-submitting .dd-stickybar__submit-text {
    visibility: hidden;
}

.dd-stickybar__submit-spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
}

.dd-stickybar.is-submitting .dd-stickybar__submit-spinner {
    opacity: 1;
    animation: dd-sb-spin 0.7s linear infinite;
}

@keyframes dd-sb-spin {
    to { transform: rotate(360deg); }
}

/* 안내문구 + 개인정보 동의 */
.dd-stickybar__note {
    flex: 0 0 auto;
    color: var(--dd-sb-bottom-fg);
    font-size: 12.5px;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 260px;
}

.dd-stickybar__note-line {
    margin: 0;
    opacity: 0.85;
}

.dd-stickybar__agree {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    color: var(--dd-sb-bottom-fg);
}

.dd-stickybar__agree input {
    accent-color: var(--dd-sb-cta-bg);
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.dd-stickybar__agree a {
    color: var(--dd-sb-bottom-fg);
    border-bottom: 1px dotted rgba(122, 18, 62, 0.5);
}

.dd-stickybar__agree a:hover {
    color: #F82F72;
}

/* 전송 상태 메시지 */
.dd-stickybar__status {
    min-height: 0;
    padding: 0 24px;
    font-size: 12.5px;
    color: var(--dd-sb-bottom-fg);
}

.dd-stickybar__status:not(:empty) {
    padding-top: 4px;
    padding-bottom: 8px;
}

.dd-stickybar__status[data-kind="ok"]      { color: #0E8A4F; }
.dd-stickybar__status[data-kind="error"]   { color: #C8002A; }
.dd-stickybar__status[data-kind="pending"] { color: #7A123E; }

/* 본문이 바에 가려지지 않도록 */
body.dd-has-stickybar { padding-bottom: calc(var(--dd-sb-h-top) + var(--dd-sb-h-bottom) + 12px); }

/* 우측 floating CTA(cta-float)가 바와 겹치지 않게 위로 밀어 올림 */
.cta-float {
    bottom: calc(var(--dd-sb-h-top) + var(--dd-sb-h-bottom) + 16px) !important;
}

/* ==========================================================================
   반응형
   ========================================================================== */
@media (max-width: 1080px) {
    .dd-stickybar__bottom .dd-stickybar__inner {
        flex-wrap: wrap;
    }
    .dd-stickybar__note {
        order: 99;
        flex: 1 1 100%;
        max-width: none;
        flex-direction: row;
        gap: 12px;
        align-items: center;
        font-size: 12px;
    }
    .dd-stickybar__note-line { flex: 1 1 auto; }
    .dd-stickybar__input { flex: 1 1 160px; }
}

@media (max-width: 820px) {
    :root { --dd-sb-h-bottom: 56px; }
    .dd-stickybar__top { display: none; }
    .dd-stickybar__bottom .dd-stickybar__inner {
        gap: 8px;
        padding: 8px 14px;
    }
    .dd-stickybar__call-label { display: none; }
    .dd-stickybar__call-num { font-size: 18px; }
    .dd-stickybar__input--name { display: none; }
    .dd-stickybar__input--phone {
        flex: 1 1 auto;
        height: 40px;
    }
    .dd-stickybar__submit {
        height: 40px;
        padding: 0 16px;
        font-size: 14px;
    }
    .dd-stickybar__note { display: none; }
    body.dd-has-stickybar {
        padding-bottom: calc(var(--dd-sb-h-bottom) + 8px);
    }
    .cta-float {
        bottom: calc(var(--dd-sb-h-bottom) + 12px) !important;
    }
}

@media (max-width: 480px) {
    .dd-stickybar__bottom .dd-stickybar__inner { padding: 6px 10px; gap: 6px; }
    .dd-stickybar__call { gap: 6px; }
    .dd-stickybar__call-icon { width: 22px; height: 22px; }
    .dd-stickybar__call-num { font-size: 16px; }
    .dd-stickybar__input--phone { display: none; }
    .dd-stickybar__call { flex: 1 1 auto; justify-content: center; }
    .dd-stickybar__submit {
        padding: 0 14px;
        font-size: 13.5px;
    }
}
