/* ===== WC見積もりシステム 共通スタイル ===== */

/* ---- フロント：見積もり追加ボタン ---- */
.wcqs-add-wrap { margin: 1rem 0; }
.wcqs-qty-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wcqs-qty-label { font-size: 14px; color: #555; }
.wcqs-qty-input { width: 80px; padding: 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; text-align: right; }

.wcqs-add-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #1a6e3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
.wcqs-add-btn:hover { background: #145430; }
.wcqs-add-btn:disabled { background: #888; cursor: not-allowed; }
.wcqs-loop-btn { padding: 8px 16px; font-size: 13px; }
.wcqs-add-msg { margin-left: 10px; font-size: 13px; }
.wcqs-add-msg.wcqs-ok { color: #1a6e3c; }

/* ---- フロント：見積もりカート ---- */
.wcqs-cart-wrap { max-width: 800px; margin: 2rem auto; }
.wcqs-empty { color: #888; text-align: center; padding: 2rem; }

.wcqs-cart-header,
.wcqs-cart-row {
    display: grid;
    grid-template-columns: 1fr 130px 110px 130px 70px;
    gap: 8px;
    align-items: center;
    padding: 12px 8px;
}
.wcqs-cart-header {
    font-size: 12px;
    color: #888;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 4px;
}
.wcqs-cart-row { border-bottom: 1px solid #f0f0f0; }
.wcqs-cart-row:hover { background: #fafafa; }
.wcqs-product-name { font-size: 14px; }
.wcqs-price, .wcqs-sub { font-size: 14px; text-align: right; }
.wcqs-cart-qty { width: 70px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; text-align: right; }

.wcqs-remove-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #888;
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
}
.wcqs-remove-btn:hover { border-color: #c00; color: #c00; }

.wcqs-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0 1rem;
    font-size: 15px;
}
.wcqs-grand-total { font-size: 24px; font-weight: 600; }

.wcqs-to-request-btn {
    display: block;
    text-align: center;
    padding: 14px;
    background: #1a6e3c;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s;
}
.wcqs-to-request-btn:hover { background: #145430; color: #fff; }

/* ---- フロント：申請フォーム ---- */
.wcqs-request-wrap { max-width: 700px; margin: 2rem auto; }
.wcqs-section-title { font-size: 17px; font-weight: 600; margin: 2rem 0 1rem; border-bottom: 2px solid #e5e5e5; padding-bottom: 8px; }

.wcqs-request-items { background: #f9f9f9; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.wcqs-request-item-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid #eee; }
.wcqs-request-item-row:last-child { border-bottom: none; }

.wcqs-field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.wcqs-field { margin-bottom: 16px; }
.wcqs-field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.wcqs-field input,
.wcqs-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.wcqs-field textarea { resize: vertical; }
.wcqs-required { background: #c00; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }

.wcqs-submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #1a6e3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
    margin-top: 1rem;
}
.wcqs-submit-btn:hover { background: #145430; }

.wcqs-success { background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 8px; padding: 1.5rem; color: #1a6e3c; text-align: center; }

/* ---- 管理画面 ---- */
.wcqs-admin-wrap { max-width: 1200px; }
.wcqs-back-link { display: inline-block; margin-bottom: 1rem; color: #666; font-size: 13px; text-decoration: none; }
.wcqs-back-link:hover { color: #000; }

.wcqs-status-tabs { display: flex; gap: 4px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.wcqs-status-tabs a {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    background: #fff;
    transition: all .15s;
}
.wcqs-status-tabs a.active,
.wcqs-status-tabs a:hover { background: #1a6e3c; color: #fff; border-color: #1a6e3c; }

.wcqs-table th, .wcqs-table td { vertical-align: middle; padding: 10px 12px; }

.wcqs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.wcqs-badge--pending    { background: #fff3cd; color: #856404; }
.wcqs-badge--processing { background: #cce5ff; color: #004085; }
.wcqs-badge--quoted     { background: #d4edda; color: #155724; }
.wcqs-badge--accepted   { background: #d1ecf1; color: #0c5460; }
.wcqs-badge--closed     { background: #e2e3e5; color: #383d41; }

.wcqs-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 1.5rem;
}
.wcqs-detail-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.25rem;
}
.wcqs-detail-card h3 { margin: 0 0 1rem; font-size: 15px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.wcqs-detail-card--full { grid-column: 1 / -1; }

.wcqs-info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wcqs-info-table th { width: 80px; text-align: left; color: #888; padding: 6px 8px 6px 0; font-weight: 400; vertical-align: top; }
.wcqs-info-table td { padding: 6px 0; }

.wcqs-items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wcqs-items-table th, .wcqs-items-table td { padding: 8px; border-bottom: 1px solid #eee; }
.wcqs-items-table th { font-size: 12px; color: #888; font-weight: 400; }
.wcqs-items-table tfoot td { font-size: 15px; border-top: 2px solid #ddd; border-bottom: none; }

.wcqs-select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; margin-right: 8px; }
.wcqs-amount-input { width: 200px; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }

@media ( max-width: 768px ) {
    .wcqs-cart-header { display: none; }
    .wcqs-cart-row { grid-template-columns: 1fr 80px; grid-template-rows: auto auto; }
    .wcqs-field-group { grid-template-columns: 1fr; }
    .wcqs-detail-grid { grid-template-columns: 1fr; }
    .wcqs-detail-card--full { grid-column: 1; }
}
