/* Google Noto Sans KR Font & Font Awesome */
/* @import url()은 PHP 파일에서 wp_enqueue_style()로 처리되므로,
   이 파일에서 @import를 사용하지 않아도 됩니다.
   하지만 CDN 링크를 <head>에 직접 넣지 않았다면,
   이 @import 규칙들이 폰트와 아이콘을 불러오는 역할을 할 것입니다. */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

.survey-container-custom {
    font-family: 'Noto Sans KR', '맑은 고딕', 'Malgun Gothic', sans-serif;
    padding: 40px 20px;
    max-width: 800px;
    margin: 40px auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    color: #333333;
    line-height: 1.6;
    border: 1px solid #eeeeee;
}

.survey-title-custom {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
}

.survey-description-custom {
    font-size: 16px;
    color: #555555;
    text-align: center;
    margin-bottom: 30px;
}

.survey-category-select-custom {
    margin-bottom: 30px;
    text-align: center;
}

.select-label-custom {
    display: block;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.styled-select-custom {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background-color: #f8f8f8;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233498db' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); /* 파란색 화살표 */
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.styled-select-custom:focus {
    border-color: #3498db; /* 파란색 강조 */
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.survey-form-custom {
    border-top: 1px solid #eeeeee;
    padding-top: 30px;
}

.question-group-custom {
    margin-bottom: 40px;
    padding: 25px;
    background-color: #fdfdfd;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.question-group-custom h3 {
    font-size: 24px;
    font-weight: 600;
    color: #3498db; /* 파란색 강조 */
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
    display: flex;
    align-items: center;
}
.question-group-custom h3 i {
    margin-right: 10px;
    font-size: 28px;
    color: #2980b9; /* 더 진한 파란색 */
}

.question-item-custom {
    margin-bottom: 25px;
}
.question-item-custom:last-child {
    margin-bottom: 0;
}

.question-item-custom label {
    display: block;
    font-size: 17px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.radio-group-custom, .checkbox-group-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-group-custom input[type="radio"],
.checkbox-group-custom input[type="checkbox"] {
    display: none;
}

.radio-group-custom label,
.checkbox-group-custom label {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid #dddddd;
    border-radius: 25px;
    background-color: #fcfcfc;
    color: #555555;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.radio-group-custom input[type="radio"]:checked + label,
.checkbox-group-custom input[type="checkbox"]:checked + label {
    background-color: #3498db; /* 선택 시 파란색 */
    color: #ffffff;
    border-color: #3498db;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}
.radio-group-custom label:hover,
.checkbox-group-custom label:hover {
    border-color: #3498db;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

textarea {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background-color: #f8f8f8;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.submit-button-custom {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 0 auto;
    padding: 15px 25px;
    background-color: #3498db; /* 파란색 */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.submit-button-custom:hover {
    background-color: #2980b9; /* 더 진한 파란색 */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --- Validation Styles --- */
.question-item-custom.is-invalid {
    border: 1px solid #e74c3c; /* 빨간색 테두리 */
    padding: 15px; /* 테두리 공간 확보 */
    border-radius: 10px;
    background-color: #fffafa; /* 아주 연한 빨간색 배경 */
}
.question-item-custom.is-invalid label {
    color: #e74c3c; /* 라벨 텍스트도 빨간색 */
}
.error-message-custom {
    color: #e74c3c; /* 에러 메시지 빨간색 */
    font-size: 13px;
    margin-top: 8px; /* 경고 메시지 상단 여백 */
    display: block;
    font-weight: 500;
}
.error-message-custom:empty { /* 에러 메시지가 비어있으면 숨김 */
    display: none;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .survey-container-custom {
        padding: 25px 15px;
        margin: 20px auto;
    }
    .survey-title-custom {
        font-size: 28px;
    }
    .survey-description-custom {
        font-size: 15px;
    }
    .question-group-custom {
        padding: 20px;
    }
    .question-group-custom h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .question-group-custom h3 i {
        font-size: 24px;
    }
    .question-item-custom label {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .radio-group-custom, .checkbox-group-custom {
        flex-direction: column; /* 모바일에서 세로로 정렬 */
        gap: 10px;
    }
    .radio-group-custom label,
    .checkbox-group-custom label {
        width: 100%; /* 전체 너비 차지 */
        justify-content: center; /* 가운데 정렬 */
        padding: 10px 15px;
        font-size: 14px;
    }
    textarea {
        width: calc(100% - 20px);
        padding: 10px;
        font-size: 15px;
    }
    .submit-button-custom {
        padding: 12px 20px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .survey-title-custom {
        font-size: 24px;
    }
    .survey-description-custom {
        font-size: 14px;
    }
    .styled-select-custom {
        font-size: 14px;
        padding: 10px;
    }
    .question-group-custom h3 {
        font-size: 18px;
    }
    .question-group-custom h3 i {
        font-size: 20px;
    }
    .question-item-custom label {
        font-size: 15px;
    }
    .radio-group-custom label,
    .checkbox-group-custom label {
        font-size: 13px;
        padding: 8px 12px;
    }
}