/* ===== House Construction Calculator ===== */
.hc-wrap {
    font-family: inherit;
    max-width: 860px;
    margin: 0 auto;
    padding: 0;
}
.hc-title {
    font-size: 1.6em;
    margin-bottom: 24px;
    color: inherit;
    border-bottom: 3px solid #e67e22;
    padding-bottom: 10px;
}

/* STEPS */
.hc-steps {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}
.hc-step {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    font-size: 0.82em;
    font-weight: 600;
    color: #888;
    background: #f5f5f5;
    border-right: 1px solid #ddd;
    cursor: default;
    transition: background 0.2s, color 0.2s;
}
.hc-step:last-child { border-right: none; }
.hc-step span {
    display: inline-block;
    width: 22px; height: 22px;
    line-height: 22px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    font-size: 0.85em;
    margin-right: 5px;
}
.hc-step.active {
    background: #e67e22;
    color: #fff;
}
.hc-step.active span { background: rgba(255,255,255,0.35); color: #fff; }
.hc-step.completed {
    background: #27ae60;
    color: #fff;
}
.hc-step.completed span { background: rgba(255,255,255,0.3); }

/* PANELS */
.hc-panel { display: none; }
.hc-panel.active { display: block; }
.hc-panel-title {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

/* ROWS & FIELDS */
.hc-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.hc-field {
    flex: 1;
    min-width: 200px;
}
.hc-field--wide { flex: 0 0 100%; }
.hc-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #444;
}
.hc-req { color: #e74c3c; }
.hc-hint { font-size: 0.78em; color: #888; margin-top: 4px; display: block; }

/* INPUT */
.hc-input {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.hc-input:focus { outline: none; border-color: #e67e22; }
textarea.hc-input { resize: vertical; }

/* RADIO GROUP */
.hc-radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.hc-radio {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; padding: 7px 14px;
    border: 2px solid #ddd; border-radius: 6px;
    font-size: 0.9em; font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
}
.hc-radio input { display: none; }
.hc-radio:has(input:checked) {
    border-color: #e67e22; background: #fef5ec; color: #e67e22;
}
/* fallback for older browsers */
.hc-radio input:checked ~ span { color: #e67e22; }

/* CARDS */
.hc-card-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.hc-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    background: #fff;
}
.hc-card:hover {
    border-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230,126,34,0.15);
}
.hc-card.active {
    border-color: #e67e22;
    background: #fef5ec;
}
.hc-card-icon { font-size: 1.6em; margin-bottom: 5px; }
.hc-card-name { font-weight: 700; font-size: 0.85em; color: #333; }
.hc-card-desc { font-size: 0.75em; color: #888; margin-top: 3px; }
.hc-card.active .hc-card-name { color: #e67e22; }

/* CHECKBOXES */
.hc-check-group { display: flex; flex-wrap: wrap; gap: 10px; }
.hc-check {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 8px 14px;
    border: 2px solid #ddd; border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
}
.hc-check input { display: none; }
.hc-check-box {
    width: 18px; height: 18px;
    border: 2px solid #ccc; border-radius: 4px;
    flex-shrink: 0; transition: all 0.2s;
    position: relative;
}
.hc-check input:checked ~ .hc-check-box {
    background: #e67e22; border-color: #e67e22;
}
.hc-check input:checked ~ .hc-check-box::after {
    content: '✓'; position: absolute; top: -1px; left: 2px;
    color: #fff; font-size: 12px; font-weight: 700;
}
.hc-check:has(input:checked) { border-color: #e67e22; background: #fef5ec; }
.hc-check-icon { font-size: 1.1em; }

/* NAVIGATION */
.hc-nav {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 24px; padding-top: 16px;
    border-top: 1px solid #eee;
}
.hc-nav--form { justify-content: space-between; }

/* BUTTONS */
.hc-btn {
    padding: 11px 24px;
    border: none; border-radius: 6px;
    font-size: 0.95em; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.hc-btn--next, .hc-btn--calc {
    background: #e67e22; color: #fff;
}
.hc-btn--next:hover, .hc-btn--calc:hover { background: #cf6d17; }
.hc-btn--calc { background: #27ae60; font-size: 1em; padding: 12px 28px; }
.hc-btn--calc:hover { background: #219a52; }
.hc-btn--prev {
    background: #f0f0f0; color: #555;
}
.hc-btn--prev:hover { background: #e0e0e0; }
.hc-btn--submit { background: #2c3e50; color: #fff; }
.hc-btn--submit:hover { background: #1a252f; }
.hc-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* CURRENCY SWITCH */
.hc-currency-switch {
    display: flex; gap: 6px; margin-bottom: 20px;
}
.hc-cur {
    padding: 7px 18px;
    border: 2px solid #ddd; border-radius: 6px;
    background: #fff; cursor: pointer;
    font-size: 0.9em; font-weight: 600;
    transition: all 0.2s; font-family: inherit;
}
.hc-cur.active { border-color: #e67e22; background: #e67e22; color: #fff; }
.hc-cur:hover:not(.active) { border-color: #e67e22; color: #e67e22; }

/* RESULT TABLE */
.hc-result-table {
    border: 1px solid #ddd; border-radius: 8px;
    overflow: hidden; margin-bottom: 16px;
    font-size: 0.88em;
}
.hc-result-header {
    display: grid;
    grid-template-columns: 3fr 1.2fr 1.4fr 1.4fr;
    background: #2c3e50; color: #fff;
    padding: 10px 14px; font-weight: 700; font-size: 0.85em;
}
.hc-result-row {
    display: grid;
    grid-template-columns: 3fr 1.2fr 1.4fr 1.4fr;
    padding: 9px 14px; border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.hc-result-row:hover { background: #fafafa; }
.hc-result-row:last-child { border-bottom: none; }
.hc-pos-total--val { font-weight: 600; color: #27ae60; }
.hc-result-total {
    display: grid;
    grid-template-columns: 3fr 1.2fr 1.4fr 1.4fr;
    padding: 12px 14px;
    background: #f8f8f8;
    border-top: 2px solid #e67e22;
    font-weight: 700; font-size: 1em;
}
.hc-total-amount { color: #e67e22; font-size: 1.1em; }
.hc-result-range {
    padding: 8px 14px; background: #fffbf5;
    font-size: 0.82em; color: #888;
    display: flex; justify-content: space-between;
    border-top: 1px solid #f0e0d0;
}
.hc-result-note {
    font-size: 0.82em; color: #888;
    padding: 10px 12px; background: #f9f9f9;
    border-radius: 6px; border-left: 3px solid #ddd;
    margin-bottom: 24px;
}

/* REQUEST FORM */
.hc-request-form {
    border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 24px; background: #fafcff;
}
.hc-form-title { font-size: 1.1em; font-weight: 700; margin-bottom: 6px; }
.hc-form-sub { color: #888; font-size: 0.88em; margin-bottom: 20px; }
.hc-form-msg {
    padding: 10px 14px; border-radius: 6px;
    margin-bottom: 12px; font-size: 0.9em;
    display: none;
}
.hc-form-msg:not(:empty) { display: block; }
.hc-msg--ok { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
.hc-msg--err { background: #fdedec; color: #922b21; border: 1px solid #f5b7b1; }

/* RESPONSIVE */
@media (max-width: 600px) {
    .hc-steps { font-size: 0.72em; }
    .hc-card-group { grid-template-columns: repeat(2, 1fr); }
    .hc-result-header,
    .hc-result-row,
    .hc-result-total {
        grid-template-columns: 2fr 1fr 1fr;
    }
    .hc-result-header span:nth-child(3),
    .hc-result-row .hc-pos-unit,
    .hc-result-total span:nth-child(3) { display: none; }
    .hc-nav--form { flex-direction: column; }
    .hc-currency-switch { flex-wrap: wrap; }
}
