/**
 * JetForm Builder 조회 시스템 CSS - 단순한 디자인
 */

/* ==========================================================================
   기본 컨테이너 스타일
   ========================================================================== */

.jetform-search-container {
    max-width: 100%;
    font-family: Arial, sans-serif;
    color: #333;
    background: white;
    border: 1px solid #ddd;
}

/* ==========================================================================
   검색 폼 스타일
   ========================================================================== */

.search-form {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.search-form .form-row input:-internal-autofill-selected{
    background-color: var(--base-light) !important;}

.search-form h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #333;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-row label .required {
    color: #d00;
    margin-left: 3px;
}

.form-row input {
    width: 100%;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.form-row input.error {
    border-color: #d00;
}

.field-error {
    color: #d00;
    font-size: 12px;
    margin-top: 3px;
}

/* ==========================================================================
   검색 버튼 스타일
   ========================================================================== */

.search-button {
    background: var(--base);
    color: white;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-size: var(--text-m);
    font-weight: 500;
    transition: background 0.2s ease-in-out;
}

.search-button:hover {
    background: var(--base-dark);
}

.search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.search-loader {
    display: none;
}

/* ==========================================================================
   검색 결과 스타일
   ========================================================================== */

.search-results {
    padding: 20px;
}

.initial-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

.results-header {
    background: var(--base-trans-50);
    padding: 15px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.results-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* ==========================================================================
   테이블 결과 스타일
   ========================================================================== */

.search-results-table-container {
    background: white;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.table-responsive {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

.results-table thead {
    background: #f5f5f5;
}

.results-table th {
    padding: 12px 10px;
    font-family: 'Score', sans-serif;
    text-align: left;
    font-weight: 500;
    color: #333;
    border: 1px solid #ddd;
    white-space: nowrap;
}

.results-table th.col-field-name {
    width: 150px;
    text-align: left;
}

.results-table th.col-submission {
    min-width: 120px;
    text-align: left;
}


.results-table tbody tr:hover {
    background: #f0f0f0;
}

.results-table td {
    padding: 10px;
    font-family: 'Score', sans-serif;
    border: 1px solid #ddd;
    vertical-align: top;
    line-height: 1.4;
    word-break: break-word;
    color: #333;
}

.results-table .field-name-cell {
    background: #f5f5f5;
    font-family: 'Score', sans-serif;
    font-weight: 500;
    color: #333;
    text-align: left;
    border-right: 2px solid #ddd;
    white-space: nowrap;
}

.results-table .submission-data {
    text-align: left;
    padding: 10px;
    min-width: 120px;
}

/* ==========================================================================
   링크 스타일
   ========================================================================== */

.email-link,
.phone-link {
    color: #0073aa;
    text-decoration: none;
}

.email-link:hover,
.phone-link:hover {
    text-decoration: underline;
}

.website-link {
    color: #0073aa;
    text-decoration: none;
}

.website-link:hover {
    text-decoration: underline;
}

.multi-value-item {
    display: inline-block;
    background: #f0f0f0;
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin: 1px 2px;
    border: 1px solid #ddd;
}

/* ==========================================================================
   버튼 스타일
   ========================================================================== */

.btn-secondary {
    background: #666;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #555;
}

.btn-primary {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #005a87;
}

/* ==========================================================================
   오류 및 로딩 스타일
   ========================================================================== */

.error-message {
    text-align: center;
    padding: 20px;
    background: #ffeaea;
    color: #d00;
    border: 1px solid #ffc0c0;
    border-radius: 3px;
    margin: 20px;
}

.loading-container {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   반응형 디자인
   ========================================================================== */

@media (max-width: 768px) {
    .jetform-search-container {
        margin: 10px;
        border-radius: 3px;
    }
    
    .search-form {
        padding: 15px;
    }
    
    .search-form h3 {
        font-size: 18px;
    }
    
    .form-row input {
        padding: 10px;
        font-size: 16px;
    }
    
    .search-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .search-results-table-container {
        margin: 10px;
    }

    .table-responsive {
        font-size: 12px;
    }

    .results-table th,
    .results-table td {
        padding: 8px 6px;
    }

    .results-table th.col-field-name {
        width: 100px;
    }

    .results-table th.col-submission {
        min-width: 80px;
    }

    .results-table .submission-data {
        min-width: 80px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .jetform-search-container {
        margin: 5px;
    }
    
    .search-form {
        padding: 10px;
    }
    
    .search-form h3 {
        font-size: 16px;
    }
    
    .search-results-table-container {
        margin: 5px;
    }

    .results-table th,
    .results-table td {
        padding: 6px 4px;
    }

    .results-table {
        font-size: 11px;
    }

    .results-table th.col-field-name {
        width: 80px;
    }

    .results-table .submission-data {
        padding: 6px;
        font-size: 12px;
    }
}

/* ==========================================================================
   인쇄 스타일
   ========================================================================== */

@media print {
    .search-form {
        display: none;
    }
    
    .jetform-search-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .search-results-table-container {
        background: white;
        box-shadow: none;
    }
    
    .results-table {
        background: white;
        color: black;
    }
    
    .results-table thead {
        background: #f0f0f0 !important;
        color: black !important;
    }
    
    .results-table th,
    .results-table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
    
    .results-table tbody tr:hover {
        background: transparent !important;
    }
}