/* =============================================================
   WGC Quote Calculator — Frontend Styles
   ============================================================= */

/* Layout */
.wgc-quote-wrap {
    display: flex;
    gap: 28px;
    font-family: inherit;
    margin: 0 auto;
    align-items: flex-start;
}

/* ---- Sidebar ---- */
.wgc-quote-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.wgc-sidebar-section + .wgc-sidebar-section {
    margin-top: 24px;
}

.wgc-sidebar-label {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    margin: 0 0 6px;
}

.wgc-quote-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wgc-quote-tab {
    border-bottom: 1px solid #ddd;
}

.wgc-tab-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 4px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #444;
    line-height: 1.35;
    user-select: none;
}

.wgc-tab-label input[type="radio"] {
    accent-color: #7a6248;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

.wgc-quote-tab.is-active .wgc-tab-label {
    color: #7a6248;
    font-weight: 600;
}

/* ---- Content area ---- */
.wgc-quote-content {
    flex: 1;
    min-width: 0;
}

.wgc-quote-panel {
    display: none;
}

.wgc-quote-panel.is-active {
    display: block;
}

/* Panel title bar */
.wgc-panel-title {
    background: #807166;
    color: #fff;
    padding: 12px 18px;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 8px 8px 0 0;
}

/* ---- Sections ---- */
.wgc-section {
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.wgc-section-head {
    color: #473D3C;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 18px 7px;
    font-size: 0.85rem;
    font-weight: 600;
}

.wgc-section-head__cols {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.wgc-section-head__cols span {
    width: 90px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Column label row */
.wgc-col-labels {
    display: grid;
    grid-template-columns: 30px 1fr 90px 90px;
    padding: 4px 18px;
    font-size: 0.77rem;
    font-weight: 700;
    color: #666;
    border-bottom: 1px solid #e8ddd2;
}

.wgc-col-labels .wgc-col-check { }
.wgc-col-labels .wgc-col-item  { text-align: left; }
.wgc-col-labels .wgc-col-qty   { text-align: right; }
.wgc-col-labels .wgc-col-quote { text-align: right; }

/* Line items */
.wgc-item {
    display: grid;
    grid-template-columns: 30px 1fr 90px 90px;
    align-items: center;
    padding: 6px 18px;
    border-bottom: 1px solid #f0ece4;
    font-size: 0.875rem;
    min-height: 36px;
    transition: background 0.1s;
}

.wgc-item:last-child {
    border-bottom: none;
}

/* Row checkbox */
.wgc-item-check {
    width: 16px;
    height: 16px;
    accent-color: #7a6248;
    cursor: pointer;
    flex-shrink: 0;
}

/* Disabled (unchecked) row */
.wgc-item--disabled {
    background: #f9f7f4 !important;
}

.wgc-item--disabled .wgc-item__name {
    color: #bbb;
}

.wgc-item--disabled .wgc-input--qty,
.wgc-item--disabled .wgc-input--text {
    background: #f0ece8;
    color: #ccc;
    border-color: #e0d8d0;
}

.wgc-item--disabled .wgc-item__quote {
    color: #ccc;
}

.wgc-item__name {
    color: #333;
    padding-right: 12px;
    line-height: 1.3;
    transition: color 0.15s;
}

.wgc-flat-unit {
    text-align: right;
    font-size: 0.75rem;
    color: #aaa;
    font-style: italic;
}

/* Inputs */
.wgc-input--qty,
.wgc-input--text {
    display: block;
    width: 80px;
    margin-left: auto;
    padding: 4px 7px;
    border: 1px solid #c8b89a;
    border-radius: 3px;
    font-size: 0.875rem;
    text-align: right;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.wgc-input--qty:focus,
.wgc-input--text:focus {
    outline: none;
    border-color: #7a6248;
    box-shadow: 0 0 0 2px rgba(122, 98, 72, 0.18);
}

/* Remove number spinner arrows for cleaner look */
.wgc-input--qty::-webkit-inner-spin-button,
.wgc-input--qty::-webkit-outer-spin-button {
    opacity: 1;
}

.wgc-flat-label {
    display: flex;
    justify-content: flex-end;
}

.wgc-input--flat {
    width: 18px;
    height: 18px;
    accent-color: #7a6248;
    cursor: pointer;
}

/* Quote values */
.wgc-item__quote {
    text-align: right;
    font-size: 0.875rem;
    color: #333;
    font-feature-settings: "tnum";
}

.wgc-item__quote--pending {
    color: #aaa;
    font-style: italic;
}

/* Total row */
.wgc-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    padding: 10px 18px;
	border-left: 1px solid #f0ece4;
	border-right: 1px solid #f0ece4;
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
}

.wgc-total-label {
    margin-right: 0;
    padding-right: 18px;
}

.wgc-total-val {
    min-width: 90px;
    text-align: right;
    font-feature-settings: "tnum";
}

/* Submit button */
.wgc-submit-btn {
    display: block;
    width: 100%;
    padding: 15px 24px;
    background: #AB9157;
    color: #fff;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0 0 8px 8px;
    transition: background 0.2s ease;
    margin-top: 0;
}

.wgc-submit-btn:hover,
.wgc-submit-btn:focus-visible {
    background: #807166;
    outline: none;
	color: #FFF;
}

.wgc-no-items,
.wgc-no-services {
    padding: 24px 18px;
    color: #777;
    font-style: italic;
    border: 1px solid #ddd;
    background: #faf7f3;
    border-radius: 0 0 3px 3px;
}

/* ---- Modal ---- */
.wgc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wgc-modal-overlay[hidden] {
    display: none;
}

.wgc-modal-box {
    background: #fff;
    border-radius: 6px;
    padding: 32px 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.wgc-modal-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: #7a6248;
    font-weight: 700;
}

.wgc-modal-desc {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: #666;
}

.wgc-modal-field {
    display: block;
    margin-bottom: 14px;
    font-size: 0.875rem;
    color: #444;
}

.wgc-modal-field span {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.wgc-modal-field abbr {
    text-decoration: none;
    color: #b00;
    margin-left: 2px;
}

.wgc-modal-field input {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c8b89a;
    border-radius: 3px;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.wgc-modal-field input:focus {
    outline: none;
    border-color: #7a6248;
    box-shadow: 0 0 0 2px rgba(122, 98, 72, 0.18);
}

#wgc-modal-notice {
    min-height: 8px;
    margin-bottom: 4px;
}

.wgc-notice {
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.wgc-notice--success {
    background: #edf7ee;
    color: #2d6a30;
    border: 1px solid #a3d4a6;
}

.wgc-notice--error {
    background: #fdecea;
    color: #9b1c1c;
    border: 1px solid #f5a5a5;
}

.wgc-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.wgc-btn-cancel {
    background: #f0ece6;
    color: #555;
    border: 1px solid #ddd;
    padding: 9px 20px;
    border-radius: 3px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}

.wgc-btn-cancel:hover {
    background: #e4ddd5;
}

.wgc-btn-send {
    background: #a08050;
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.wgc-btn-send:hover {
    background: #8b6e3f;
}

.wgc-btn-send:disabled {
    background: #bba888;
    cursor: default;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .wgc-quote-wrap {
        flex-direction: column;
        gap: 20px;
    }

    .wgc-quote-sidebar {
        width: 100%;
    }

    .wgc-quote-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-top: none;
    }

    .wgc-quote-tab {
        border: 1px solid #ddd;
        border-radius: 3px;
    }

    .wgc-tab-label {
        padding: 8px;
    }

    .wgc-item {
        grid-template-columns: 26px 1fr 80px 80px;
        padding: 5px 12px;
        font-size: 0.82rem;
    }

    .wgc-col-labels {
        grid-template-columns: 26px 1fr 80px 80px;
    }

    .wgc-panel-title,
    .wgc-section-head {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .wgc-col-labels,
    .wgc-total-row {
        padding: 4px 12px;
    }

    .wgc-section-head__cols span,
    .wgc-col-labels .wgc-col-qty,
    .wgc-col-labels .wgc-col-quote {
        width: 80px;
    }

    .wgc-total-val {
        min-width: 80px;
    }

    .wgc-submit-btn {
        padding: 13px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .wgc-quote-tabs {
        grid-template-columns: 1fr;
    }

    .wgc-item {
        grid-template-columns: 26px 1fr 70px 70px;
        padding: 4px 10px;
    }

    .wgc-col-labels {
        grid-template-columns: 26px 1fr 70px 70px;
    }
}
