/**
 * NovaQD 문의 폼 스타일
 */

/* 메시지 박스 */
.novaqd-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.novaqd-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.novaqd-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.novaqd-message svg {
    flex-shrink: 0;
}

/* 필드 에러 */
.field-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

input.error,
textarea.error {
    border-color: #dc3545 !important;
}

input.error:focus,
textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* 로딩 스피너 */
.novaqd-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* 버튼 비활성화 상태 */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 문자 수 카운터 */
.char-counter {
    font-size: 12px;
    color: #666;
    text-align: right;
}

.char-counter.text-red-500 {
    color: #dc3545;
}

/* 체크박스 커스텀 스타일 보완 */
input[type="checkbox"]:checked + label {
    background-color: #2860AF;
    border-color: #2860AF;
}

input[type="checkbox"]:checked + label img {
    display: block !important;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .novaqd-message {
        font-size: 13px;
        padding: 10px 14px;
    }

    .field-error {
        font-size: 11px;
    }
}

/* 폼 전체 스타일 개선 */
#novaqd-inquiry-form {
    transition: opacity 0.3s ease;
}

#novaqd-inquiry-form.submitting {
    opacity: 0.6;
    pointer-events: none;
}

/* 입력 필드 포커스 스타일 */
#novaqd-inquiry-form input:focus,
#novaqd-inquiry-form textarea:focus {
    outline: none;
    border-color: #2860AF;
    box-shadow: 0 0 0 3px rgba(40, 96, 175, 0.1);
}

/* 라벨 스타일 */
#novaqd-inquiry-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* 필수 항목 표시 */
#novaqd-inquiry-form label span.text-rose-500 {
    color: #dc3545;
    margin-left: 2px;
}

/* 버튼 호버 효과 개선 */
#novaqd-inquiry-form button[type="submit"] {
    transition: all 0.3s ease;
    transform: translateY(0);
}

#novaqd-inquiry-form button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 96, 175, 0.3);
}

/* 성공 애니메이션 */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.success-checkmark {
    stroke-dasharray: 100;
    animation: checkmark 0.5s ease-in-out;
}