/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   전화번호 수집 폼 스타일 (업로드 이미지 디자인 적용)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* CSS 변수 - dbcart 스타일 */
:root {
    --pc-primary: #4A72FF;
    --pc-primary-hover: #3A5FE6;
    --pc-success: #00C853;
    --pc-error: #FF3B30;
    --pc-text-primary: #000000;
    --pc-text-secondary: #555555;
    --pc-border: #D0D0D0;
    --pc-bg-light: #FFFFFF;
    --pc-white: #FFFFFF;
}

/* 폼 컨테이너 - dbcart 스타일 */
#phone-collect-form.pc-form {
    max-width: 440px;
    margin: 0 auto;
    padding: 28px 24px 24px 24px;
    background: #FFFFFF !important;
    border: 1px solid #D5D5D5;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    box-shadow: none;
}

/* 제목 - dbcart 스타일 */
#phone-collect-form .pc-title {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 16px 0;
    text-align: left;
    letter-spacing: -0.3px;
}

/* 전화번호 입력 그룹 - dbcart 스타일 */
#phone-collect-form .pc-phone-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

#phone-collect-form .pc-phone-prefix {
    width: 80px;
    min-width: 80px;
    height: 48px;
    padding: 0 10px;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    font-size: 15px;
    color: #000000;
    background: #F8F8F8 !important;
    cursor: not-allowed;
    font-weight: 400;
    flex-shrink: 0;
}

#phone-collect-form .pc-separator {
    color: #CCCCCC;
    font-size: 14px;
    font-weight: 400;
    flex-shrink: 0;
    margin: 0 2px;
}

#phone-collect-form .pc-phone-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    font-size: 15px;
    color: #000000;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    background: #FFFFFF !important;
    font-weight: 400;
}

#phone-collect-form .pc-phone-input::placeholder {
    color: #BBBBBB;
}

#phone-collect-form .pc-phone-input:focus {
    outline: none;
    border-color: #4A72FF;
    box-shadow: none;
}

#phone-collect-form .pc-phone-input.error {
    border-color: var(--pc-error);
}

#phone-collect-form .pc-phone-input.success {
    border-color: var(--pc-success);
}

/* 에러 메시지 - dbcart 스타일 */
#phone-collect-form .pc-error-message {
    display: none;
    color: var(--pc-error);
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 0;
    padding: 10px 12px;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid #FFD0D0;
    border-radius: 6px;
    font-weight: 400;
    text-align: left;
}

#phone-collect-form .pc-error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 동의 항목 - dbcart 스타일 */
#phone-collect-form .pc-agreements {
    margin: 14px 0 16px 0;
}

#phone-collect-form .pc-checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
}

#phone-collect-form .pc-checkbox-wrapper:first-child {
    margin-bottom: 10px;
}

#phone-collect-form .pc-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #4A72FF;
    flex-shrink: 0;
}

#phone-collect-form .pc-checkbox-label {
    font-size: 14px;
    color: #333333;
    user-select: none;
    font-weight: 400;
    line-height: 1.3;
}

#phone-collect-form .pc-agreement-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start;
    margin-bottom: 8px;
    gap: 4px !important;
}

#phone-collect-form .pc-agreement-item .pc-checkbox-wrapper {
    flex: 0 1 auto;
    min-width: 0;
    margin-bottom: 0 !important;
}

#phone-collect-form .pc-view-btn {
    background: none !important;
    border: none !important;
    color: #4A72FF !important;
    font-size: 13px !important;
    cursor: pointer !important;
    padding: 0 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

#phone-collect-form .pc-view-btn:hover {
    color: #3A5FE6 !important;
    text-decoration: underline !important;
}

/* 동의문 텍스트 - dbcart 스타일 */
#phone-collect-form .pc-consent-text {
    margin: 6px 0 8px 0;
    padding: 12px;
    background: #F9F9F9;
    border-radius: 6px;
    border: 1px solid #E5E5E5;
    max-height: 120px;
    overflow-y: auto;
}

#phone-collect-form .pc-consent-content {
    font-size: 12px;
    line-height: 1.5;
    color: #666666;
    white-space: pre-wrap;
    font-weight: 400;
}

/* 제출 버튼 - dbcart 스타일 */
#phone-collect-form .pc-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 0;
    background: #4A72FF !important;
    color: #FFFFFF !important;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

#phone-collect-form .pc-submit-btn[data-state="disabled"] {
    background: #0055ff !important;
    color: #FFFFFF !important;
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none !important;
}

#phone-collect-form .pc-submit-btn[data-state="active"] {
    background: #c82333 !important;
    color: #FFFFFF !important;
    cursor: pointer;
    height: 52px;
    font-size: 16px;
    opacity: 1 !important;
}

#phone-collect-form .pc-submit-btn[data-state="active"]:hover {
    background: #a71d2a !important;
}

/* 버튼 바운스 애니메이션 */
#phone-collect-form .pc-submit-btn.pc-bounce {
    animation: pc-bounce-pulse 1s ease-out;
}

@keyframes pc-bounce-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(200, 35, 51, 0.2);
    }
    15% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(200, 35, 51, 0.4);
    }
    30% {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(200, 35, 51, 0.3);
    }
    45% {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(200, 35, 51, 0.35);
    }
    60% {
        transform: scale(0.99);
        box-shadow: 0 2px 8px rgba(200, 35, 51, 0.25);
    }
    75% {
        transform: scale(1.01);
        box-shadow: 0 3px 10px rgba(200, 35, 51, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(200, 35, 51, 0.2);
    }
}

#phone-collect-form .pc-submit-btn[data-state="loading"] {
    background: #c82333 !important;
    color: transparent;
    cursor: wait;
}

#phone-collect-form .pc-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#phone-collect-form .pc-btn-text::after {
    content: '✓';
    font-size: 18px;
}

#phone-collect-form .pc-submit-btn[data-state="loading"] .pc-btn-text {
    display: none;
}

#phone-collect-form .pc-btn-loader {
    display: none;
    position: absolute;
}

#phone-collect-form .pc-submit-btn[data-state="loading"] .pc-btn-loader {
    display: block;
}

/* 스피너 애니메이션 - dbcart 스타일 */
#phone-collect-form .pc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--pc-white);
    border-radius: 50%;
    animation: pc-spin 0.8s linear infinite;
}

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

/* 성공 메시지 - dbcart 스타일 */
#phone-collect-form .pc-success-message {
    display: none;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 14px;
    background: rgba(0, 200, 83, 0.08);
    border: 1px solid #B8E6C8;
    border-radius: 8px;
    color: var(--pc-success);
    font-size: 14px;
    font-weight: 500;
}

#phone-collect-form .pc-success-message.show {
    display: flex;
}

#phone-collect-form .pc-success-icon {
    font-size: 18px;
    margin-right: 8px;
}

/* Copyright - dbcart 스타일 */
#phone-collect-form .pc-copyright {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
    color: #999999;
    font-weight: 400;
    line-height: 1.4;
}

/* Honeypot (숨김) */
.pc-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   반응형 (태블릿)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 1024px) {
    .pc-form {
        max-width: 800px;
        padding: 50px 32px;
    }

    .pc-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .pc-phone-input,
    .pc-phone-prefix {
        height: 60px;
        font-size: 17px;
    }

    .pc-submit-btn {
        height: 68px;
        font-size: 19px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   반응형 (모바일) - 컴팩트 & 가독성 개선
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 모바일 - dbcart 스타일 */
@media (max-width: 767px) {
    #phone-collect-form.pc-form {
        max-width: 100% !important;
        padding: 20px 16px 16px 16px !important;
        border-radius: 10px !important;
        border-width: 1px !important;
    }

    #phone-collect-form .pc-title {
        font-size: 16px !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
        font-weight: 700 !important;
    }

    #phone-collect-form .pc-phone-group {
        gap: 4px !important;
        margin-bottom: 10px !important;
    }

    #phone-collect-form .pc-phone-prefix {
        width: 70px !important;
        min-width: 70px !important;
        height: 44px !important;
        font-size: 14px !important;
        padding: 0 8px !important;
        border-radius: 6px !important;
        border-width: 1px !important;
        font-weight: 400 !important;
    }

    #phone-collect-form .pc-separator {
        font-size: 13px !important;
        margin: 0 2px !important;
        color: #CCCCCC !important;
    }

    #phone-collect-form .pc-phone-input {
        height: 44px !important;
        font-size: 14px !important;
        padding: 0 10px !important;
        border-radius: 6px !important;
        border-width: 1px !important;
        font-weight: 400 !important;
    }

    #phone-collect-form .pc-error-message {
        font-size: 12px !important;
        padding: 8px 10px !important;
        margin-top: 6px !important;
        border-radius: 6px !important;
        border-width: 1px !important;
        font-weight: 400 !important;
    }

    #phone-collect-form .pc-agreements {
        margin: 10px 0 12px 0 !important;
    }

    #phone-collect-form .pc-checkbox-wrapper {
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }

    #phone-collect-form .pc-checkbox-wrapper:first-child {
        margin-bottom: 8px !important;
    }

    #phone-collect-form .pc-checkbox {
        width: 16px !important;
        height: 16px !important;
        margin-right: 6px !important;
        flex-shrink: 0 !important;
    }

    #phone-collect-form .pc-checkbox-label {
        font-size: 13px !important;
        line-height: 1.3 !important;
        font-weight: 400 !important;
    }

    #phone-collect-form .pc-agreement-item {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-bottom: 6px !important;
    }

    #phone-collect-form .pc-agreement-item .pc-checkbox-wrapper {
        margin-bottom: 0 !important;
        flex: 0 1 auto !important;
    }

    #phone-collect-form .pc-view-btn {
        display: inline-block !important;
        font-size: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: none !important;
        color: #4A72FF !important;
        text-decoration: none !important;
        font-weight: 400 !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        line-height: 1.3 !important;
    }

    #phone-collect-form .pc-view-btn:hover {
        text-decoration: underline !important;
    }

    #phone-collect-form .pc-consent-text {
        margin: 4px 0 6px 0 !important;
        padding: 10px !important;
        max-height: 100px !important;
        border-radius: 6px !important;
        border-width: 1px !important;
    }

    #phone-collect-form .pc-consent-content {
        font-size: 11px !important;
        line-height: 1.4 !important;
        font-weight: 400 !important;
    }

    #phone-collect-form .pc-submit-btn {
        height: 48px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        margin-top: 0 !important;
        font-weight: 600 !important;
    }

    #phone-collect-form .pc-submit-btn[data-state="active"] {
        height: 48px !important;
        font-size: 15px !important;
    }

    #phone-collect-form .pc-btn-text {
        gap: 5px !important;
    }

    #phone-collect-form .pc-btn-text::after {
        font-size: 16px !important;
    }

    #phone-collect-form .pc-success-message {
        margin-top: 10px !important;
        padding: 10px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
        border-width: 1px !important;
        font-weight: 400 !important;
    }

    #phone-collect-form .pc-success-icon {
        font-size: 16px !important;
        margin-right: 6px !important;
    }

    #phone-collect-form .pc-copyright {
        margin-top: 12px !important;
        font-size: 10px !important;
        line-height: 1.4 !important;
        font-weight: 400 !important;
    }
}

/* 매우 작은 모바일 (360px 이하) - dbcart 스타일 */
@media (max-width: 400px) {
    #phone-collect-form.pc-form {
        padding: 10px 8px !important;
    }

    #phone-collect-form .pc-title {
        font-size: 15px !important;
        margin-bottom: 6px !important;
    }

    #phone-collect-form .pc-phone-group {
        gap: 2px !important;
        margin-bottom: 5px !important;
    }

    #phone-collect-form .pc-phone-prefix {
        width: 50px !important;
        min-width: 45px !important;
        height: 34px !important;
        padding: 0 2px !important;
        font-size: 11px !important;
    }

    #phone-collect-form .pc-separator {
        font-size: 11px !important;
    }

    #phone-collect-form .pc-phone-input {
        height: 34px !important;
        padding: 0 4px !important;
        font-size: 11px !important;
    }

    #phone-collect-form .pc-checkbox {
        width: 13px !important;
        height: 13px !important;
        margin-right: 3px !important;
    }

    #phone-collect-form .pc-checkbox-label {
        font-size: 9px !important;
    }

    #phone-collect-form .pc-view-btn {
        font-size: 9px !important;
        margin-left: 2px !important;
    }

    #phone-collect-form .pc-agreements {
        margin: 6px 0 !important;
    }

    #phone-collect-form .pc-checkbox-wrapper {
        margin-bottom: 2px !important;
    }

    #phone-collect-form .pc-checkbox-wrapper:first-child {
        margin-bottom: 4px !important;
    }

    #phone-collect-form .pc-agreement-item {
        margin-bottom: 2px !important;
    }

    #phone-collect-form .pc-consent-text {
        margin: 2px 0 4px 0 !important;
        padding: 6px !important;
    }

    #phone-collect-form .pc-submit-btn {
        height: 38px !important;
        font-size: 12px !important;
        margin-top: 6px !important;
    }

    #phone-collect-form .pc-submit-btn[data-state="active"] {
        height: 40px !important;
        font-size: 13px !important;
    }

    .pc-copyright {
        margin-top: 6px !important;
        font-size: 7px !important;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .pc-checkbox {
        width: 28px;
        height: 28px;
    }

    .pc-view-btn {
        padding: 10px 16px;
        font-size: 16px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   커스텀 스타일 오버라이드 (폼 크기 최소화)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 1. 폼 테두리 선 굵기를 절반으로 (2px → 1px) */
.pc-form {
    border-width: 1px;
}

/* 2. '연락처' 제목 크기 조정 */
.pc-title {
    font-size: 20px;
}

/* 모바일에서는 더 작게 */
@media (max-width: 767px) {
    .pc-title {
        font-size: 18px;
    }
}

/* 3. 버튼 색상 변경 */
.pc-submit-btn {
    background: #0055ff !important;
}

.pc-submit-btn[data-state="disabled"] {
    background: #0055ff !important;
}

.pc-submit-btn[data-state="active"] {
    background: #c82333 !important;
}

.pc-submit-btn[data-state="active"]:hover {
    background: #a71d2a !important;
}

.pc-submit-btn[data-state="loading"] {
    background: #c82333 !important;
}

/* 4. 연락처 작성 칸 테두리 선 굵기를 절반으로 (2px → 1px) */
.pc-phone-input {
    border-width: 1px;
}

.pc-phone-prefix {
    border-width: 1px;
}
