/* ===== 공통 스타일 ===== */
.business-info-form {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.error {
    color: #721c24;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    background-color: #f8d7da;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    padding-left: 45px;
}

.error::before {
    content: "⚠️";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.business-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.business-info-table th,
.business-info-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.business-info-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 30%;
}

.business-info-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.business-info-table tr:hover {
    background-color: #f1f1f1;
}

#business-info-result {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}

#business-info-edit-form {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

#business-info-edit-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.edit-button {
    margin-top: 15px;
}

/* ===== 관리자 페이지 공통 스타일 ===== */
.wrap .card {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin-top: 20px;
    padding: 1px 12px 12px;
}

/* ===== 테이블 관리 공통 스타일 ===== */
.pagination-container .tablenav-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.data-table-container table input {
    width: 100%;
}

.data-table-container .new-row input {
    border: 2px solid #0073aa;
    background-color: #f9f9f9;
}

.data-table-container .new-row input:focus {
    border-color: #0073aa;
}

.data-table-container tr.editing input {
    border: 2px solid #0073aa;
    background-color: #f9f9f9;
}

.data-table-container tr.editing input:focus {
    border-color: #0073aa;
}

.upload-progress {
    display: none;
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.upload-progressbar {
    width: 100%;
    height: 20px;
    margin: 5px 0;
}

.upload-percentage {
    font-weight: bold;
    color: #0073aa;
}

.add-new-button,
.search-input {
    margin: 10px 0;
}

.data-table-container table {
    width: 100%;
}

.data-table-container th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.data-table-container td {
    padding: 8px;
    border: 1px solid #ddd;
}

/* ===== 요율표 관리 전용 스타일 ===== */
#rate-pagination-container .tablenav-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

#rate-data-table-container table input {
    width: 100%;
}

/* ===== 보험요율 관리 전용 스타일 ===== */
#insurance-rate-pagination-container .tablenav-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

#insurance-rate-data-table-container table input {
    width: 100%;
}

#insurance-rate-data-table-container .new-insurance-rate-row input {
    border: 2px solid #0073aa;
    background-color: #f9f9f9;
}

#insurance-rate-data-table-container .new-insurance-rate-row input:focus {
    border-color: #0073aa;
}

#insurance-rate-data-table-container tr.editing input {
    border: 2px solid #0073aa;
    background-color: #f9f9f9;
}

#insurance-rate-data-table-container tr.editing input:focus {
    border-color: #0073aa;
}

#insurance-upload-progress {
    display: none;
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#insurance-upload-progressbar {
    width: 100%;
    height: 20px;
    margin: 5px 0;
}

#insurance-upload-percentage {
    font-weight: bold;
    color: #0073aa;
}

#add-new-insurance-rate,
#add-test-insurance-data {
    margin: 10px 0;
}

#insurance-rate-search-input {
    margin: 10px 0;
}

#insurance-rate-data-table-container table {
    width: 100%;
}

#insurance-rate-data-table-container th {
    background-color: #f8f9fa;
    font-weight: bold;
}

#insurance-rate-data-table-container td {
    padding: 8px;
    border: 1px solid #ddd;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .business-info-form {
        margin: 10px;
        padding: 15px;
    }

    .business-info-table th,
    .business-info-table td {
        padding: 8px;
        font-size: 14px;
    }

    button[type="submit"] {
        width: 100%;
    }

    .form-group input {
        font-size: 14px;
    }

    #insurance-rate-search-input {
        width: 100%;
    }

    #insurance-rate-data-table-container table {
        font-size: 12px;
    }

    #insurance-rate-data-table-container th,
    #insurance-rate-data-table-container td {
        padding: 4px;
    }
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 설문 섹션 스타일 */
.survey-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.survey-section h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.survey-section p {
    margin: 10px 0;
}

.survey-section label {
    display: inline-block;
    width: 120px;
    font-weight: bold;
}

.survey-section input,
.survey-section textarea {
    width: calc(100% - 130px);
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.survey-section textarea {
    resize: vertical;
    min-height: 80px;
}

/* 보험료 계산 섹션 스타일 */
#insurance_calculation_section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin-top: 20px;
}

#insurance_calculation_section h4 {
    color: #495057;
    margin-bottom: 15px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

#additional_info_form,
#premium_calculation_form {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ced4da;
}

#premium_result {
    background-color: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #b3d9ff;
}

#premium_result h5 {
    color: #0056b3;
    margin-top: 0;
}

/* 요율 구득 섹션 스타일 */
#rate_acquisition_section {
    background-color: #fff3cd;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ffeaa7;
    margin-top: 20px;
}

#rate_acquisition_section h4 {
    color: #856404;
    margin-bottom: 15px;
}

#acquisition_reason {
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #f5c6cb;
}

/* 버튼 스타일 개선 */
.button {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.button-primary {
    background-color: #007cba;
    color: white;
}

.button-primary:hover {
    background-color: #005a87;
}

.button-secondary {
    background-color: #6c757d;
    color: white;
}

.button-secondary:hover {
    background-color: #545b62;
}

/* 입력 필드 스타일 개선 */
input[type="number"],
input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* 테이블 스타일 개선 */
.business-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.business-info-table th,
.business-info-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.business-info-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    width: 30%;
}

.business-info-table td {
    color: #212529;
}

.business-info-table tr:hover {
    background-color: #f8f9fa;
}

/* 로딩 및 메시지 스타일 */
.loading {
    text-align: center;
    padding: 20px;
    color: #007cba;
    font-weight: bold;
}

.success {
    color: #155724;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    background-color: #d4edda;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    padding-left: 45px;
}

.success::before {
    content: "✅";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .survey-section label {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .survey-section input,
    .survey-section textarea {
        width: 100%;
    }
    
    .business-info-table th,
    .business-info-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    .business-info-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .business-info-table td {
        border-bottom: 1px solid #ddd;
        padding-top: 5px;
    }
}

/* 설문서 폼 스타일 */
.bic-survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.survey-logo {
    text-align: center;
    margin-bottom: 20px;
}

.survey-logo-img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
}

.survey-title {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
    font-size: 2em;
    font-weight: 600;
}

.survey-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* 페이지 헤더 스타일 */
.page-header {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.header-logo img {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.header-text h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
}

.header-right {
    flex-shrink: 0;
    max-width: 300px;
}

.header-notice {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 10px;
    font-size: 0.9em;
    color: #1976d2;
    line-height: 1.4;
}

.header-additional {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* 페이지 진행 표시 */
.page-progress {
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #007cba;
    transition: width 0.3s ease;
}

.page-indicator {
    font-size: 0.9em;
    color: #666;
}

/* 페이지 네비게이션 */
.page-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.prev-page-button,
.next-page-button,
.submit-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.prev-page-button {
    background: #6c757d;
    color: white;
}

.prev-page-button:hover {
    background: #5a6268;
}

.next-page-button {
    background: #007cba;
    color: white;
}

.next-page-button:hover {
    background: #005a87;
}

.submit-button {
    background: #28a745;
    color: white;
}

.submit-button:hover {
    background: #218838;
}

.submit-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* 폼 필드 스타일 */
.bic-survey-form .form-group {
    margin-bottom: 20px;
}

.bic-survey-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.bic-survey-form input[type="text"],
.bic-survey-form input[type="email"],
.bic-survey-form input[type="tel"],
.bic-survey-form input[type="number"],
.bic-survey-form input[type="date"],
.bic-survey-form input[type="time"],
.bic-survey-form input[type="url"],
.bic-survey-form textarea,
.bic-survey-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.bic-survey-form input:focus,
.bic-survey-form textarea:focus,
.bic-survey-form select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.bic-survey-form .field-description {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* 라디오 버튼과 체크박스 */
.bic-survey-form .radio-group,
.bic-survey-form .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bic-survey-form .radio-item,
.bic-survey-form .checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 테이블 필드 */
.survey-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.survey-table th,
.survey-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.survey-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* 성공 메시지 */
.success-message {
    text-align: center;
    padding: 40px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    color: #155724;
}

.success-message h3 {
    margin-bottom: 10px;
    color: #155724;
}

/* 페이지 푸터 */
.page-footer {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    margin-top: 30px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .bic-survey-container {
        padding: 15px;
        margin: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-right {
        max-width: 100%;
    }
    
    .header-text h2 {
        font-size: 1.3em;
    }
    
    .page-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .prev-page-button,
    .next-page-button,
    .submit-button {
        width: 100%;
    }
} 