/* 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-order-flow {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    margin: 30px 0;
}

.jc-order-flow h3 {
    margin: 0 0 20px 0;
    color: #004085;
    font-size: 16px;
    font-weight: 600;
}

.jc-flow-steps {
    display: flex;
    gap: 15px;
}

.jc-flow-step {
    flex: 1;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    gap: 12px;
}

.jc-step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #004085;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.jc-step-content {
    flex: 1;
}

.jc-step-content h4 {
    margin: 0 0 6px 0;
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.jc-step-content p {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

.jc-note {
    color: #999;
    font-size: 11px;
}

.jc-warning {
    color: #d32f2f;
    font-size: 11px;
    font-weight: 600;
}

/* 詳細な注意事項セクション */
.jc-order-details {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0 30px 0;
}

/* 領収書・送付状ページのお知らせ */
.jc-documents-notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0 30px 0;
}

.jc-documents-notice p {
    margin: 0;
    color: #004085;
    font-size: 12px;
    line-height: 1.7;
}

.jc-order-details h3 {
    margin: 0 0 15px 0;
    color: #004085;
    font-size: 15px;
    font-weight: 600;
}

.jc-detail-box {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.jc-detail-box:last-child {
    margin-bottom: 0;
}

.jc-detail-box h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.jc-detail-box ul {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.jc-detail-box li {
    color: #666;
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 6px;
}

.jc-detail-box p {
    color: #666;
    font-size: 12px;
    line-height: 1.7;
    margin: 0 0 8px 0;
}

.jc-detail-box p:last-child {
    margin-bottom: 0;
}

.jc-warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px 12px;
    margin: 10px 0;
}

.jc-warning-box p {
    color: #856404;
    font-size: 11px;
    line-height: 1.6;
    margin: 0 0 5px 0;
}

.jc-warning-box p:last-child {
    margin-bottom: 0;
}

.jc-check-note {
    color: #666;
    font-size: 11px;
    line-height: 1.6;
    margin-top: 10px;
}

.jc-red-text {
    color: #d32f2f !important;
}

.jc-support-time {
    color: #999;
    font-size: 11px;
    margin-top: 5px;
}

.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;
    font-size: 13px;
}

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

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

/* PC表示で操作列のボタンを1行に */
.jc-quote-table td[data-label="操作"] {
    white-space: nowrap;
}

.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 {
        display: block;
        border: none;
    }
    
    .jc-quote-table thead {
        display: none;
    }
    
    .jc-quote-table tbody {
        display: block;
    }
    
    .jc-quote-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .jc-quote-table td {
        display: block;
        text-align: left !important;
        padding: 8px 0 !important;
        border: none !important;
    }
    
    .jc-quote-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 100px;
        color: #004085;
    }
    
    .jc-quote-table td:first-child {
        font-size: 16px;
        font-weight: 700;
        color: #004085;
        border-bottom: 1px solid #eee !important;
        padding-bottom: 10px !important;
        margin-bottom: 10px;
    }
    
    .jc-quote-table td:first-child:before {
        display: none;
    }
    
    /* ボタンを縦並びに */
    .jc-quote-table .jc-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
    
    /* 注文フローのレスポンシブ対応 */
    .jc-order-flow {
        padding: 15px;
    }
    
    .jc-order-flow h3 {
        font-size: 14px;
    }
    
    .jc-flow-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .jc-flow-step {
        padding: 12px;
    }
    
    .jc-step-content h4 {
        font-size: 12px;
    }
    
    .jc-step-content p {
        font-size: 11px;
    }
    
    /* 詳細注意事項のレスポンシブ対応 */
    .jc-order-details {
        padding: 15px;
    }
    
    .jc-order-details h3 {
        font-size: 13px;
    }
    
    /* 領収書・送付状のお知らせレスポンシブ対応 */
    .jc-documents-notice {
        padding: 12px;
    }
    
    .jc-documents-notice p {
        font-size: 11px;
    }
    
    .jc-detail-box {
        padding: 12px;
    }
    
    .jc-detail-box h4 {
        font-size: 12px;
    }
    
    .jc-detail-box li,
    .jc-detail-box p {
        font-size: 11px;
    }
    
    .jc-warning-box {
        padding: 8px 10px;
    }
    
    .jc-warning-box p {
        font-size: 10px;
    }
    
    .jc-check-note,
    .jc-support-time {
        font-size: 10px;
    }
}

/* 見積依頼詳細モーダル */
.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;
}
