/**
 * 고객문의 게시판 스타일시트
 * PHP 5.2.1 환경 - IE7+ 지원
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Container */
.inquiry-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Typography */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

/* Messages */
.alert {
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid;
    border-radius: 3px;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group .required {
    color: #e74c3c;
}

.form-input,
.form-select,
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.form-input:focus,
.form-select:focus,
textarea:focus {
    outline: none;
    border-color: #0066cc;
}

textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Search Form */
.search-form {
    background-color: #f8f8f8;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.search-row {
    display: table;
    width: 100%;
}

.search-row > * {
    display: table-cell;
    padding: 0 5px;
}

.search-row .form-select {
    width: 150px;
}

.search-row .form-input {
    width: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    color: #fff;
    background-color: #0066cc;
    border-color: #0066cc;
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
}

.btn-secondary {
    color: #333;
    background-color: #fff;
    border-color: #ddd;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
}

.btn-search {
    color: #fff;
    background-color: #5cb85c;
    border-color: #4cae4c;
}

.btn-reset {
    color: #333;
    background-color: #f0f0f0;
    border-color: #ddd;
}

.btn-admin {
    color: #fff;
    background-color: #d9534f;
    border-color: #d43f3a;
}

/* Button Group */
.button-group {
    margin-top: 20px;
    text-align: center;
}

.button-group .btn {
    margin: 0 5px;
}

/* List Header */
.list-header {
    display: table;
    width: 100%;
    margin-bottom: 10px;
}

.list-header .total-count {
    display: table-cell;
    vertical-align: middle;
    font-weight: bold;
}

.list-header .btn {
    display: table-cell;
    width: 100px;
    text-align: right;
}

/* Table */
.inquiry-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid #333;
}

.inquiry-table th,
.inquiry-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.inquiry-table th {
    background-color: #f8f8f8;
    font-weight: bold;
}

.inquiry-table td {
    background-color: #fff;
}

.inquiry-table tr:hover td {
    background-color: #f5f5f5;
}

.inquiry-table .notice td {
    background-color: #fffbf0;
    font-weight: bold;
}

/* Table Columns */
.col-no { width: 60px; }
.col-category { width: 100px; }
.col-title { text-align: left; }
.col-writer { width: 100px; }
.col-date { width: 100px; }
.col-status { width: 80px; }
.col-views { width: 60px; }

/* Table Elements */
.icon-lock {
    color: #f39c12;
    margin-right: 5px;
}

.answer-count {
    color: #e74c3c;
    font-weight: bold;
    font-size: 12px;
}

.no-data {
    padding: 50px !important;
    text-align: center !important;
    color: #999;
}

/* Status */
.status {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.status-pending {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border: 1px solid #faebcc;
}

.status-answered {
    color: #3c763d;
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
}

.status-closed {
    color: #666;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .current {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination .prev,
.pagination .next {
    font-weight: bold;
}

/* Admin Menu */
.admin-menu {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .inquiry-container {
        padding: 10px;
    }
    
    .search-row > * {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .inquiry-table {
        font-size: 12px;
    }
    
    .inquiry-table th,
    .inquiry-table td {
        padding: 5px;
    }
    
    .col-category,
    .col-views {
        display: none;
    }
}

/* IE7 Fixes */
*:first-child+html .inquiry-table { border-collapse: collapse; }
*:first-child+html .btn { display: inline; zoom: 1; }
*:first-child+html .form-input { width: 98%; }