/* JapanConnect Quote System - Frontend CSS */

/* コンテナ */
.jc-quote-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* フォームラッパー */
.jc-quote-form-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.jc-quote-form-wrapper.wide {
    max-width: 800px;
    margin: 0 auto;
}

.jc-quote-form-wrapper h2 {
    margin-top: 0;
    color: #004085;
    border-bottom: 2px solid #004085;
    padding-bottom: 10px;
}

.jc-quote-form-wrapper h3 {
    margin-top: 30px;
    color: #333;
    border-left: 4px solid #004085;
    padding-left: 10px;
}

/* フォーム */
.jc-quote-form {
    margin-top: 20px;
}

.jc-form-group {
    margin-bottom: 20px;
}

.jc-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.jc-form-group input[type="text"],
.jc-form-group input[type="email"],
.jc-form-group input[type="password"],
.jc-form-group input[type="tel"],
.jc-form-group input[type="number"],
.jc-form-group textarea,
.jc-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.jc-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.jc-form-group .required {
    color: #dc3545;
}

.jc-form-row {
    display: flex;
    gap: 20px;
}

.jc-form-row .jc-form-group {
    flex: 1;
}

/* ボタン */
.jc-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.jc-btn-primary {
    background: #004085;
    color: #fff;
}

.jc-btn-primary:hover {
    background: #003366;
}

.jc-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.jc-btn-secondary:hover {
    background: #5a6268;
}

.jc-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.jc-btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* リンクテキスト */
.jc-link-text {
    text-align: center;
    margin-top: 20px;
}

.jc-link-text a {
    color: #004085;
    text-decoration: underline;
}

/* メッセージ */
.jc-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

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

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

/* マイページ */
.jc-mypage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #004085;
}

.jc-mypage-header h2 {
    margin: 0;
    color: #004085;
}

.jc-mypage-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.jc-mypage-info h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.jc-mypage-actions {
    text-align: center;
    margin: 30px 0;
}

.jc-mypage-actions .jc-btn {
    font-size: 16px;
    padding: 15px 40px;
}

/* テーブル */
.jc-quote-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 20px;
}

.jc-quote-table thead {
    background: #004085;
    color: #fff;
}

.jc-quote-table th,
.jc-quote-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.jc-quote-table tbody tr:hover {
    background: #f8f9fa;
}

/* ステータスラベル */
.jc-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.jc-status-draft {
    background: #e7e7e7;
    color: #333;
}

.jc-status-requested {
    background: #fff3cd;
    color: #856404;
}

.jc-status-processing {
    background: #cce5ff;
    color: #004085;
}

.jc-status-completed {
    background: #d4edda;
    color: #155724;
}

/* セクション */
.jc-section {
    background: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.jc-section h3 {
    margin-top: 0;
    color: #004085;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* オプショングループ */
.jc-option-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.jc-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

.jc-checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.jc-checkbox-label strong {
    margin-right: 10px;
}

.jc-price-info {
    color: #666;
    font-size: 13px;
}

/* 合計金額セクション */
.jc-totals-section {
    background: #f8f9fa;
    border: 2px solid #004085;
}

.jc-totals {
    max-width: 400px;
    margin-left: auto;
}

.jc-total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.jc-grand-total {
    font-size: 18px;
    font-weight: bold;
    color: #004085;
    border-bottom: 2px solid #004085;
    padding: 15px 0;
}

/* フォームアクション */
.jc-form-actions {
    text-align: right;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #ddd;
}

.jc-form-actions .jc-btn {
    margin-left: 10px;
}

/* モーダル */
.jc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    overflow: auto;
}

.jc-modal.active {
    display: block;
}

.jc-modal-content {
    background: #fff;
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    position: relative;
}

.jc-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.jc-modal-close:hover {
    color: #000;
}

/* 見積詳細 */
.jc-quote-detail h2 {
    margin-top: 0;
    color: #004085;
    border-bottom: 2px solid #004085;
    padding-bottom: 10px;
}

.jc-detail-section {
    margin-bottom: 25px;
}

.jc-detail-section h3 {
    color: #333;
    border-left: 4px solid #004085;
    padding-left: 10px;
    margin-bottom: 15px;
}

.jc-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.jc-detail-table th,
.jc-detail-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.jc-detail-table thead {
    background: #f8f9fa;
}

.jc-category-row {
    background: #e9ecef;
    font-weight: bold;
}

.jc-detail-totals .jc-total-row {
    font-size: 15px;
}

/* データなし */
.jc-no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f8f9fa;
    border-radius: 4px;
}

/* 書類テーブル */
.jc-document-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.jc-document-table th,
.jc-document-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.jc-document-table thead {
    background: #f8f9fa;
    font-weight: 600;
}

.jc-document-table tbody tr:hover {
    background: #f8f9fa;
}

/* ローディング */
.jc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #004085;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}

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

/* レスポンシブ */
@media screen and (max-width: 768px) {
    .jc-quote-container {
        padding: 0 15px;
    }
    
    .jc-quote-form-wrapper {
        padding: 20px;
    }
    
    .jc-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .jc-mypage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .jc-quote-table {
        font-size: 12px;
    }
    
    .jc-quote-table th,
    .jc-quote-table td {
        padding: 8px;
    }
}

/* 見積依頼詳細モーダル */
.jc-request-detail-section {
    padding: 20px 0;
}

.jc-detail-group {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

.jc-detail-group h3 {
    margin: 0 0 15px 0;
    color: #0066cc;
    font-size: 16px;
}

.jc-email-input-row {
    margin-bottom: 15px;
}

.address-select, .address-input {
    transition: all 0.3s ease;
}

.jc-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.jc-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* 送付状況テーブル */
.jc-sent-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
