/**
 * Build Your Home Wizard Styles
 *
 * @package Build_Your_Home
 */

/* Variables */
:root {
    --byh-primary: #F6921E;
    --byh-primary-dark: #e07d0a;
    --byh-text: #333;
    --byh-text-light: #666;
    --byh-border: #ddd;
    --byh-bg-light: #f9f9f9;
    --byh-white: #fff;
    --byh-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Wizard Container */
.byh-wizard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--byh-text);
    max-width: 100%;
    margin: 0 auto;
    min-height: 80vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
}

/* ======================================
   Welcome Screen
   ====================================== */

.byh-wizard-welcome {
    max-width: 750px;
        width: 100%;
        padding: 40px;
        text-align: left;
        box-sizing: border-box;
        background: var(--byh-white);
        border-radius: 12px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
        border: 1px solid var(--byh-border);
}

.byh-wizard-welcome h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--byh-text);
    text-align: left;
}

.byh-region-selection {
    margin-bottom: 30px;
    text-align: left;
    width: 100%;
}

.byh-region-selection h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--byh-text);
}

.byh-region-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--byh-border);
    border-radius: 4px;
    background-color: var(--byh-white);
    color: var(--byh-text);
    cursor: pointer;
    appearance: auto;
}

.byh-region-select:focus {
    outline: none;
    border-color: var(--byh-primary);
    box-shadow: 0 0 0 2px rgba(246, 146, 30, 0.2);
}

.byh-disclaimer {
    margin-bottom: 30px;
    text-align: left;
    width: 100%;
}

.byh-disclaimer-agree {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
        font-weight: 600;
    line-height: 1.5;
    color: var(--byh-text);
        margin-bottom: 12px;
}

.byh-disclaimer-agree input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.byh-disclaimer-text {
    font-size: 13px;
        line-height: 1.6;
        color: var(--byh-text-light);
        max-height: 200px;
        overflow-y: auto;
        padding: 12px 16px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #fafafa;
}

.byh-disclaimer-text p {
    margin: 0;
}

.byh-btn-start {
    display: block;
        margin: 0 auto;
    background: var(--byh-primary);
    color: var(--byh-white);
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.byh-btn-start:hover:not(:disabled) {
    background: var(--byh-primary-dark);
}

.byh-btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Two-column wizard layout */
.byh-wizard-layout {
    display: flex;
    min-height: 80vh;
    width: 100%;
}

/* Left: Image Preview Area */
.byh-wizard-preview {
    flex: 7;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.byh-preview-placeholder {
    color: #999;
    font-size: 16px;
    text-align: center;
    padding: 40px;
}

.byh-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Right: Panel with all content */
.byh-wizard-panel {
    flex: 3;
    min-width: 350px;
    background: var(--byh-white);
    border-left: 1px solid var(--byh-border);
    padding: 25px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow-y: auto;
}

/* Tab Navigation (overlaid on preview image) */
.byh-wizard-tabs {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.byh-tab {
    padding: 10px 20px;
    border: 2px solid var(--byh-border);
    background: var(--byh-white);
    color: var(--byh-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.byh-tab:hover:not(:disabled) {
    border-color: var(--byh-primary);
    color: var(--byh-primary);
}

.byh-tab.active {
    background: var(--byh-primary);
    border-color: var(--byh-primary);
    color: var(--byh-white);
}

.byh-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.byh-tab-hidden {
    display: none !important;
}

/* Panel Header */
.byh-panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--byh-border);
}

.byh-sidebar-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px;
    color: var(--byh-text);
}

.byh-sidebar-total {
    margin-bottom: 0;
}

.byh-total-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--byh-primary);
}

/* Main Content Area */
.byh-wizard-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 5px;
}

/* Steps */
.byh-step {
    display: none;
}

.byh-step.active {
    display: block;
}

/* Sections */
.byh-section {
    margin-bottom: 20px;
}

.byh-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--byh-text);
}

/* Home Type Grid */
.byh-home-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.byh-home-type-card {
    cursor: pointer;
}

.byh-home-type-card input {
    display: none;
}

.byh-home-type-card .byh-card-content {
    border: 2px solid var(--byh-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--byh-white);
}

.byh-home-type-card:hover .byh-card-content {
    border-color: var(--byh-primary);
}

.byh-home-type-card input:checked + .byh-card-content {
    border-color: var(--byh-primary);
    box-shadow: 0 0 0 3px rgba(246, 146, 30, 0.2);
}

.byh-type-name {
    display: block;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

/* Designs Grid */
.byh-designs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.byh-design-card {
    cursor: pointer;
}

.byh-design-card input {
    display: none;
}

.byh-design-card .byh-card-content {
    border: 2px solid var(--byh-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--byh-white);
}

.byh-design-card:hover .byh-card-content {
    border-color: var(--byh-primary);
}

.byh-design-card input:checked + .byh-card-content,
.byh-design-card.selected .byh-card-content {
    border-color: var(--byh-primary);
    box-shadow: 0 0 0 3px rgba(246, 146, 30, 0.2);
}

.byh-design-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.byh-design-info {
    padding: 8px;
}

.byh-design-name {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 3px;
    color: var(--byh-text);
}

.byh-design-width {
    font-size: 11px;
    color: var(--byh-text-light);
    margin: 0 0 3px;
}

.byh-design-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--byh-primary);
    margin: 0;
}

/* Facades Grid */
.byh-facades-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.byh-facade-card {
    cursor: pointer;
}

.byh-facade-card input {
    display: none;
}

.byh-facade-card .byh-card-content {
    border: 2px solid var(--byh-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--byh-white);
}

.byh-facade-card:hover .byh-card-content {
    border-color: var(--byh-primary);
}

.byh-facade-card input:checked + .byh-card-content,
.byh-facade-card.selected .byh-card-content {
    border-color: var(--byh-primary);
    box-shadow: 0 0 0 3px rgba(246, 146, 30, 0.2);
}

.byh-facade-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.byh-facade-info {
    padding: 10px;
    text-align: center;
}

.byh-facade-name {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 3px;
    color: var(--byh-text);
}

.byh-facade-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--byh-primary);
    margin: 0;
}

/* Inclusions */
.byh-inclusion-section {
    margin-bottom: 20px;
}

.byh-inclusion-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Inclusion Card (contains title + options) */
.byh-inclusion-card {
    border: 2px solid var(--byh-border);
    border-radius: 8px;
    background: var(--byh-white);
    overflow: hidden;
    transition: all 0.3s ease;
}

.byh-inclusion-header {
    padding: 12px;
    background: var(--byh-bg-light);
    border-bottom: 1px solid var(--byh-border);
}

.byh-inclusion-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--byh-text);
}

/* Options within an inclusion */
.byh-inclusion-options {
    padding: 8px;
}

.byh-option-item {
    cursor: pointer;
    display: block;
    margin-bottom: 6px;
}

.byh-option-item:last-child {
    margin-bottom: 0;
}

.byh-option-item input {
    display: none;
}

.byh-option-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 12px;
    border: 2px solid var(--byh-border);
    border-radius: 6px;
    background: var(--byh-white);
    transition: all 0.3s ease;
}

.byh-option-item:hover .byh-option-content {
    border-color: var(--byh-primary);
}

.byh-option-item input:checked + .byh-option-content,
.byh-option-item.selected .byh-option-content {
    border-color: var(--byh-primary);
    background: rgba(246, 146, 30, 0.05);
}

.byh-option-info {
    flex: 1;
}

.byh-option-label {
    display: block;
    font-weight: 600;
    color: var(--byh-text);
    margin-bottom: 2px;
    font-size: 13px;
}

.byh-option-description {
    display: block;
    font-size: 11px;
    color: var(--byh-text-light);
    line-height: 1.4;
}

.byh-option-description ul {
    padding: 0 0 0 1em !important;
    line-height: 13px !important;
    margin: 4px 0;
}

.byh-option-description ol {
    margin: 4px 0 4px 16px;
    padding: 0;
}

.byh-option-description li {
    margin-bottom: 2px;
}

.byh-option-description p {
    margin: 2px 0;
}

.byh-option-description p:first-child {
    margin-top: 0;
}

.byh-option-description p:last-child {
    margin-bottom: 0;
}

.byh-option-description a {
    color: var(--byh-primary);
    text-decoration: underline;
}

.byh-option-price {
    font-weight: 700;
    color: var(--byh-primary);
    white-space: nowrap;
    margin-left: 10px;
    font-size: 13px;
}

/* Alfresco flat checkboxes */
.byh-alfresco-option .byh-option-content {
    display: flex;
    align-items: center;
}

.byh-alfresco-option .byh-alfresco-checkbox {
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 0 12px 0 0;
    cursor: pointer;
    flex-shrink: 0;
}

.byh-alfresco-option.selected .byh-option-content {
    border-color: var(--byh-primary);
    background: rgba(246, 146, 30, 0.05);
}

/* Summary */
.byh-sidebar-summary {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--byh-border);
}

.byh-summary-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--byh-text);
    margin: 10px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.byh-summary-item {
    margin-bottom: 4px;
}

.byh-summary-label {
    font-size: 13px;
    color: var(--byh-text-light);
    display: inline;
}

.byh-summary-value {
    font-weight: 600;
    color: var(--byh-text);
    font-size: 13px;
}

/* Summary toggle button — hidden on mobile, visible on desktop */
.byh-summary-toggle {
    display: none;
}

@media (min-width: 768px) {
    .byh-summary-grid {
        display: none !important;
    }

    .byh-summary-heading {
        display: none;
    }

    .byh-summary-toggle {
        display: inline-block;
        background: none;
        border: 1px solid var(--byh-primary);
        color: var(--byh-primary);
        padding: 6px 14px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        margin-top: 2px;
        transition: background 0.15s, color 0.15s;
    }

    .byh-summary-toggle:hover {
        background: var(--byh-primary);
        color: #fff;
    }
}

/* Summary modal */
.byh-summary-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.byh-summary-modal.active {
    display: flex;
}

.byh-summary-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.byh-summary-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--byh-border);
}

.byh-summary-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--byh-text);
}

.byh-summary-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.byh-summary-modal-close:hover {
    color: var(--byh-text);
}

.byh-summary-modal-body {
    padding: 18px;
    overflow-y: auto;
    flex: 1;
}

.byh-summary-modal-body .byh-summary-item {
    margin-bottom: 6px;
}

/* Step 6: show summary grid and hide toggle button on desktop */
@media (min-width: 768px) {
    .byh-on-step-6 .byh-summary-grid {
        display: block !important;
    }

    .byh-on-step-6 .byh-summary-heading {
        display: block;
    }

    .byh-on-step-6 .byh-summary-toggle {
        display: none;
    }
}

/* Navigation */
.byh-sidebar-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
}

.byh-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.byh-btn-prev {
    background: var(--byh-bg-light);
    color: var(--byh-text);
    border: 1px solid var(--byh-border);
}

.byh-btn-prev:hover {
    background: var(--byh-border);
}

.byh-btn-next,
.byh-btn-cart {
    background: var(--byh-primary);
    color: var(--byh-white);
    margin-left: auto;
}

.byh-btn-next:hover:not(:disabled),
.byh-btn-cart:hover:not(:disabled) {
    background: var(--byh-primary-dark);
}

.byh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ======================================
   Colours Step
   ====================================== */
.byh-colours-description {
    font-size: 13px;
    color: var(--byh-text-light);
    margin: 0 0 15px;
}

.byh-colours-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.byh-colour-card {
    cursor: pointer;
}

.byh-colour-card input {
    display: none;
}

.byh-colour-card .byh-card-content {
    border: 2px solid var(--byh-border);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--byh-white);
}

.byh-colour-card:hover .byh-card-content {
    border-color: var(--byh-primary);
}

.byh-colour-card input:checked + .byh-card-content,
.byh-colour-card.selected .byh-card-content {
    border-color: var(--byh-primary);
    box-shadow: 0 0 0 3px rgba(246, 146, 30, 0.2);
}

.byh-colour-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.byh-colour-image img[src=""],
.byh-colour-image img:not([src]) {
    display: none;
}

.byh-colour-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
}

.byh-colour-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--byh-text);
}

.byh-colour-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--byh-primary);
}

.byh-no-colours-message {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--byh-text-light);
    padding: 15px;
}

/* ======================================
   User Details Step (Step 5)
   ====================================== */
.byh-user-details-description {
    font-size: 13px;
    color: var(--byh-text-light);
    margin: 0 0 15px;
}

.byh-user-details-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.byh-user-details-form .byh-form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.byh-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--byh-text);
}

.byh-required {
    color: #dc3545;
}

.byh-form-input {
    padding: 10px 12px !important;
    border: 2px solid var(--byh-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: var(--byh-text);
    transition: border-color 0.3s ease;
    background: var(--byh-white);
    width: 100%;
    box-sizing: border-box;
}

.byh-form-input:focus {
    outline: none;
    border-color: var(--byh-primary);
    box-shadow: 0 0 0 3px rgba(246, 146, 30, 0.2);
}

.byh-form-input::placeholder {
    color: #aaa;
}

.byh-form-errors {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 10px 12px;
    color: #dc3545;
    font-size: 13px;
}

.byh-form-errors ul {
    margin: 0;
    padding-left: 18px;
}

.byh-form-errors li {
    margin-bottom: 3px;
}

/* Submit Quote button */
.byh-btn-submit {
    background: var(--byh-primary);
    color: var(--byh-white);
    margin-left: auto;
}

.byh-btn-submit:hover:not(:disabled) {
    background: var(--byh-primary-dark);
}

.byh-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success / Thank You message */
.byh-quote-success {
    text-align: center;
    padding: 30px 20px;
}

.byh-success-icon {
    width: 60px;
    height: 60px;
    background: var(--byh-primary);
    color: var(--byh-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.byh-quote-success h3 {
    font-size: 20px;
    color: var(--byh-primary);
    margin: 0 0 10px;
}

.byh-quote-success p {
    font-size: 14px;
    color: var(--byh-text-light);
    margin: 0 0 10px;
    line-height: 1.6;
}

.byh-success-order-id {
    font-weight: 700;
    color: var(--byh-text);
    font-size: 16px;
}

/* Promotions Step */
.byh-promotions-description {
    font-size: 13px;
    color: var(--byh-text-light);
    margin: 0 0 15px;
}

.byh-promotions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.byh-promotion-card {
    cursor: pointer;
    display: block;
}

.byh-promotion-card input {
    display: none;
}

.byh-promotion-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 15px;
    border: 2px solid var(--byh-border);
    border-radius: 6px;
    background: var(--byh-white);
    transition: all 0.3s ease;
}

.byh-promotion-card:hover .byh-promotion-content {
    border-color: var(--byh-primary);
}

.byh-promotion-card input:checked + .byh-promotion-content,
.byh-promotion-card.selected .byh-promotion-content {
    border-color: var(--byh-primary);
    background: rgba(246, 146, 30, 0.05);
    box-shadow: 0 0 0 3px rgba(246, 146, 30, 0.2);
}

.byh-promotion-info {
    flex: 1;
}

.byh-promotion-title {
    display: block;
    font-weight: 600;
    color: var(--byh-text);
    font-size: 14px;
    margin-bottom: 2px;
}

.byh-promotion-description {
    display: block;
    font-size: 12px;
    color: var(--byh-text-light);
    line-height: 1.4;
}

.byh-promotion-description:empty {
    display: none;
}

.byh-promotion-disclaimer {
    display: block;
    font-size: 11px;
    color: var(--byh-text-light);
    line-height: 1.4;
    padding: 8px 12px;
    margin-top: 8px;
    border-top: 1px solid #eee;
    font-style: italic;
}
.byh-promotion-discount {
    font-weight: 700;
    color: #27ae60;
    white-space: nowrap;
    margin-left: 10px;
    font-size: 14px;
}
.byh-promotion-discount.byh-promo-credit {
    color: #27ae60;
}
.byh-promotion-discount.byh-promo-cost {
    color: #b32d2e;
}

.byh-no-promotions-message {
    text-align: center;
    color: var(--byh-text-light);
    padding: 20px 15px;
}

/* Loading & Messages */
.byh-loading,
.byh-error,
.byh-no-results,
.byh-select-type-message {
    text-align: center;
    padding: 30px 15px;
    color: var(--byh-text-light);
}

.byh-error {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 992px) {
    .byh-wizard-layout {
        flex-direction: column;
    }

    .byh-wizard-preview {
        flex: none;
        height: 300px;
    }

    .byh-wizard-panel {
        flex: none;
        min-width: 0;
        max-height: none;
        border-left: none;
        border-top: 1px solid var(--byh-border);
    }
}

@media (max-width: 768px) {
    .byh-wizard-preview {
        height: 200px;
    }

    .byh-wizard-tabs {
        flex-wrap: wrap;
    }

    .byh-tab {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .byh-home-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .byh-designs-grid,
    .byh-facades-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .byh-colours-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .byh-sidebar-nav {
        flex-direction: column;
    }

    .byh-btn-next,
    .byh-btn-cart {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .byh-wizard-preview {
        display: none;
    }

    .byh-wizard-panel {
        border-top: none;
    }

    .byh-home-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .byh-designs-grid,
    .byh-facades-grid,
    .byh-colours-grid {
        grid-template-columns: 1fr;
    }
}
