/* Calculator New CSS */

@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@700&family=Open+Sans:wght@400;600&display=swap');

/* Basic styles */
body {
    padding-top: 20px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e8e8e8;
}

body.dark-mode .card {
    background-color: #2b2b2b;
    border-color: #444;
}

body.dark-mode .card-header,
body.dark-mode .card-footer {
    background-color: #333;
    border-color: #444;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

body.dark-mode .form-control::placeholder {
    color: #888;
}

body.dark-mode .step-indicator-wrapper {
    background-color: #2b2b2b;
}

body.dark-mode .step-icon {
    background-color: #444;
    color: #ccc;
}

/* Popular Style Badge */
.popular-badge-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 200 !important; /* Increased z-index to ensure overlay over image */
    pointer-events: none; /* Let clicks pass through */
}

.popular-style {
    position: relative;
    border: 2px solid #3cdbc0; /* Updated to match badge color */
    box-shadow: 0 4px 12px rgba(60, 219, 192, 0.3);
    transform: scale(1.02);
    transition: all 0.3s ease;
    border-radius: 12px; /* Ensure consistent rounding */
}

.popular-style:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(60, 219, 192, 0.4);
}

/* Dark mode adjustments for popular styles */
body.dark-mode .popular-style {
    border-color: #3cdbc0; /* Updated to match badge color */
    box-shadow: 0 4px 12px rgba(60, 219, 192, 0.4);
}

body.dark-mode .popular-style:hover {
    box-shadow: 0 6px 16px rgba(37, 207, 212, 0.5);
}

body.dark-mode .step-item.active .step-icon {
    background-color: #3cdbc0;
    color: black;
}

body.dark-mode .logo-dark {
    display: inline-block;
}

body.dark-mode .logo-light {
    display: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .form-label, .card-header h2 {
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
}

/* Header */
header h1 {
    font-size: 1.75rem;
    margin-top: 0.5rem;
}

.logo {
    max-height: 50px;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-light {
    display: inline-block;
}
.logo-dark {
    display: none;
}

.step-card {
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.debug-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    background: orange;
    color: white;
    border-radius: 5px;
    z-index: 9999;
    display: none; /* Hide debug button */
}

/* Layout */
.step-indicator-col {
    padding-right: 0;
}

.main-content-col {
    padding-left: 80px; /* Make space for the new step indicator */
}

@media (max-width: 768px) {
    body {
        padding-left: 50px; /* Slimmer space for mobile step indicator */
    }
    .main-content-col {
        padding-left: 15px; /* Reset padding */
        padding-right: 15px;
    }
    .step-indicator-col {
        display: flex; /* Ensure it's visible on mobile */
        width: 50px; /* Slimmer for mobile */
    }
    #door-styles-container.row {
        --bs-gutter-x: 0.5rem; /* Closer together on mobile */
    }
}

/* Step Form Styles */
[data-hs-step-form-content] {
    display: none;
}

[data-hs-step-form-content].active {
    display: block;
}

/* New Step Indicator Styles */
.step-indicator-col {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 65px; /* Slightly slimmer */
    background-color: #f8f9fa;
    padding: 15px 0; /* Reduced padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    border-right: 1px solid #e9ecef;
}

.step-indicator-col .step {
    list-style: none;
    padding: 0;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px; /* Reduced gap */
}

.step-indicator-col .step-item {
    width: 36px; /* Smaller circles */
    height: 36px; /* Smaller circles */
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem; /* Smaller font */
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.step-indicator-col .step-item.active {
    background-color: #3cdbc0;
    color: black;
    transform: scale(1.1);
}

.step-indicator-col .step-item.completed {
    background-color: #6c757d;
    color: white;
}

.step-indicator-col .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px; /* Shorter connector */
    background-color: #e9ecef;
}

body.dark-mode .step-indicator-col {
    background-color: #1a1a1a;
    border-right-color: #333;
}

body.dark-mode .step-indicator-col .step-item {
    background-color: #2b2b2b;
    color: #ccc;
}

body.dark-mode .step-indicator-col .step-item.active {
    background-color: #3cdbc0;
}

body.dark-mode .step-indicator-col .step-item.completed {
    background-color: #444;
}

body.dark-mode .step-indicator-col .step-item:not(:last-child)::after {
    background-color: #333;
}

@media (max-width: 768px) {
    .main-content-col {
        padding-left: 15px;
        padding-right: 15px;
    }
    .step-indicator-col {
        width: 50px; /* Match the body padding-left */
    }
    .step-indicator-col .step-item {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
     .step-indicator-col .step-item:not(:last-child)::after {
        height: 12px;
    }
}

/* Step Indicator Styles */
.step-indicator-wrapper {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: background-color 0.3s, border-color 0.3s;
    position: sticky;
    top: 20px;
    margin-top: 80px;
}

.step {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.step-item.active {
    opacity: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.step-item.active .step-icon {
    background-color: #0d6efd;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.3);
}

/* Card Styles */
.card {
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 20px;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
    position: relative;
}

.card-header {
    background-color: rgba(0,0,0,.02);
    border-bottom: 1px solid rgba(0,0,0,.05);
    padding: 1.25rem;
    transition: background-color 0.3s, border-color 0.3s;
}

.card-body {
    padding: 1.75rem;
}

.card-footer {
    background-color: rgba(0,0,0,.02);
    border-top: 1px solid rgba(0,0,0,.05);
    padding: 1.25rem;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Door Style Selection */
.door-style-card {
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    opacity: 1 !important; /* Always fully visible */
    border: 2px solid transparent;
    position: relative; /* Allow badge to position absolutely within */
    overflow: visible; /* Prevent clipping of badge */
}

#door-styles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

#door-styles-container.row {
    --bs-gutter-x: 1rem; /* Adjust horizontal gap */
    --bs-gutter-y: 1rem; /* Adjust vertical gap */
}

/* PC/Desktop specific layout - larger images, tighter spacing */
@media (min-width: 992px) {
    #door-styles-container {
        grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); /* 25% larger than 180px */
        gap: 0.75rem; /* Tighter gap */
        max-width: 1200px;
        margin: 0 auto;
    }
    
    #door-styles-container.row {
        --bs-gutter-x: 0.75rem; /* Tighter horizontal gap */
        --bs-gutter-y: 0.75rem; /* Tighter vertical gap */
    }
    
    .door-style-card img {
        height: 225px; /* 25% larger than standard */
        width: 225px;
    }
}

.door-style-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.door-style-card.selected {
    border-color: #3cdbc0;
    box-shadow: 0 8px 25px rgba(60, 219, 192, 0.3);
}

/* Door style images - Fix for green filter */
.door-style-card img {
    filter: none !important;
    -webkit-filter: none !important;
    background-color: transparent !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    image-rendering: auto !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    object-fit: contain !important;
}

/* Override any parent container effects */
#door-styles-container,
.door-style-card,
#door-styles-container img,
#door-styles-container h5,
.door-style-card img,
.door-style-card h5 {
    filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -o-filter: none !important;
    -ms-filter: none !important;
    background-color: transparent !important;
    mix-blend-mode: normal !important;
}

/* Fix any Bootstrap overrides */
.card-img-top {
    filter: none !important;
    -webkit-filter: none !important;
    background-color: transparent !important;
    mix-blend-mode: normal !important;
}

.door-style-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 5px;
    background-color: #fff;
    position: relative;
    z-index: 1;
}

.door-style-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.75rem;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    #door-styles-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .door-style-card .card-body {
        padding: 0.5rem;
    }
    .door-style-card h5 {
        font-size: 0.8rem;
    }
    .door-style-card img {
        border-radius: 4px;
    }
}

/* Form Styles */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.3s;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border-color: #86b7fe;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.btn-primary {
    background-color: #3cdbc0;
    border-color: #3cdbc0;
    box-shadow: 0 4px 10px rgba(60, 219, 192, 0.2);
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #29a08b;
    border-color: #29a08b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(60, 219, 192, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.2);
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(25, 135, 84, 0.3);
}

/* Sticky Block */
@media (min-width: 992px) {
    .sticky-top {
    position: sticky;
    top: 20px;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Section Styles */
.section-container {
    border: none;
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    animation: fadeInUp 0.5s ease-out;
}

/* Section container layout - arrange in grid on larger screens */
#sections-container {
    display: grid;
    gap: 1.5rem;
}

/* Two columns on tablet and desktop */
@media (min-width: 768px) {
    #sections-container {
        grid-template-columns: 1fr 1fr;
        max-width: 100%; /* Full width for the grid */
    }
    
    .section-detail-card {
        width: 100%; /* Ensure card fills the grid cell */
    }

    .section-container {
        max-width: 100%;
        margin-bottom: 0; /* Remove bottom margin since grid gap handles spacing */
    }
}

/* Single column on phone screens */
@media (max-width: 767px) {
    #sections-container {
        grid-template-columns: 1fr;
    }
    
    .section-container {
        max-width: 100%;
    }
}

body.dark-mode .section-container {
    background-color: #252525;
}

.section-container:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

/* Section Info Box */
.section-info-box,
.door-counts-info-box {
    background-color: #f8f9fa;
    border-left: 4px solid #0d6efd;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    animation: fadeIn 0.5s ease-out;
}

.section-info-box h5,
.door-counts-info-box h5 {
    margin-bottom: 0.75rem;
    color: #0d6efd;
}

.section-info-box ul,
.door-counts-info-box ul {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.section-info-box li,
.door-counts-info-box li {
    margin-bottom: 0.5rem;
}

.section-info-box li:last-child,
.door-counts-info-box li:last-child {
    margin-bottom: 0;
}

/* Hardware Summary CSS removed - no longer displayed in Step 3 */

/* Example Image Container */
.example-image-container {
    border: none;
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    animation: fadeIn 0.5s ease-out;
}

body.dark-mode .example-image-container {
    background-color: #252525;
    border-color: #444;
}

.example-image-container img {
        max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.example-image-container:hover img {
    transform: scale(1.02);
}

/* Image Upload */
.image-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 200px; /* Fixed height for consistent image display */
}

.image-upload-container.has-image {
    padding: 0;
    border: 1px solid #dee2e6;
}

.image-upload-container .upload-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    transition: opacity 0.3s ease;
}

.image-upload-container.has-image .upload-instructions {
    opacity: 0;
    pointer-events: none;
}

.image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain to show the entire image */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview.visible {
    opacity: 1;
}

.image-upload-buttons {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.image-preview-item img {
        width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.image-preview-item .remove-image:hover {
    background: #fff;
    transform: scale(1.1);
}

/* Estimate Page */
.estimate-container {
    background-color: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s;
    animation: fadeIn 0.5s ease-out;
}

body.dark-mode .estimate-container {
    background-color: #1e1e1e;
}

.estimate-header {
    text-align: center;
    margin-bottom: 2rem;
}

.estimate-header img {
    max-height: 60px;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

    .estimate-card {
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

/* Neumorphic Styling */
.light-mode .estimate-card {
    background: #f8f9fa;
    box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
    position: relative;
}

.dark-mode .estimate-card {
    background: #2b2b2b;
    box-shadow: 8px 8px 16px #222222, -8px -8px 16px #343434;
}

.estimate-section {
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    #project-info-container {
        max-width: 100%; /* Wider as requested */
        margin-left: auto;
        margin-right: auto;
    }
    #sections-breakdown {
        max-width: 100%; /* Full width for the grid */
    }
    .section-detail-card {
        flex-basis: 50%; /* Each card takes up half the width */
        max-width: 50%; /* Explicitly set max-width */
    }
    .section-detail-card img {
        height: 150px;
    }
}

.estimate-section h3, #sections-breakdown h3 {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

body.dark-mode .estimate-section h3, 
body.dark-mode #sections-breakdown h3 {
    border-color: #444;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem; /* Reduced vertical spacing */
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f1f1;
}

.total-cost {
    font-size: 1.25rem;
    font-weight: bold;
    border-top: 2px solid #dee2e6;
    padding-top: 0.75rem; /* Reduced vertical spacing */
    margin-top: 0.75rem; /* Reduced vertical spacing */
    border-color: #dee2e6; /* Professional line */
}

/* Section Breakdown */
.section-detail-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s;
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    width: 100%; /* Card should fill its column */
}

.section-detail-card:nth-child(1) { animation-delay: 0.1s; }
.section-detail-card:nth-child(2) { animation-delay: 0.2s; }
.section-detail-card:nth-child(3) { animation-delay: 0.3s; }
.section-detail-card:nth-child(4) { animation-delay: 0.4s; }
.section-detail-card:nth-child(5) { animation-delay: 0.5s; }

.section-detail-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.section-detail-content {
    margin-top: 0.75rem;
}

.section-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.section-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.section-image:hover img {
    transform: scale(1.05);
}

.section-detail-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain; /* Ensure the entire image is visible */
}

/* CNI Section */
.cni-section {
    background-color: #f8f9fa;
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    animation: fadeIn 0.5s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

body.dark-mode .cni-section {
    background-color: #252525;
}

.cni-section h3 {
    margin-bottom: 1rem;
}

.cni-section .btn {
    margin-top: 1rem;
}

.cni-section .btn-primary {
    background-color: #3cdbc0;
    border-color: #3cdbc0;
    font-weight: bold;
}

.cni-section .btn-primary:hover {
    background-color: #29a08b;
    border-color: #29a08b;
}

/* Contact Form */
.contact-form {
    background-color: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    animation: fadeIn 0.5s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

body.dark-mode .contact-form {
    background-color: #1e1e1e;
}

.contact-form h4 {
    margin-bottom: 0.5rem;
}

.contact-form p {
    margin-bottom: 1.25rem;
    color: #6c757d;
}

/* Tip Box */
.tip-box {
    background-color: #e8f4fd;
    border-left: 4px solid #3cdbc0;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s;
    animation: fadeIn 0.5s ease-out;
}

body.dark-mode .tip-box {
    background-color: #2c3e50;
    border-left-color: #3498db;
}

.tip-box i {
    color: #3cdbc0;
    margin-right: 0.5rem;
}

body.dark-mode .tip-box i {
    color: #3498db;
}

/* Success Message */
.success-message {
    margin-top: 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

.success-message .alert {
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.success-message .alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

body.dark-mode .success-message .alert-success {
    background-color: rgba(25, 135, 84, 0.2);
    border-color: rgba(25, 135, 84, 0.3);
    color: #d1e7dd;
}

.success-message h4 {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.success-message h4 i {
    margin-right: 0.75rem;
}

/* Dark Mode Switch */
.form-check-input {
    width: 2.5em;
    height: 1.25em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0,0,0,.25);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
    print-color-adjust: exact;
    transition: background-color 0.15s ease-in-out,background-position 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-switch .form-check-input {
    width: 2.5em;
    margin-left: -2.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
    background-position: left center;
    border-radius: 2em;
    transition: background-position 0.15s ease-in-out;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .step-indicator-wrapper {
        margin-top: 0;
        margin-bottom: 20px;
    }
    
    .step {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
    }
    
    .step-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    body {
        background-color: #fff !important;
        color: #000 !important;
    }
    
    .step-indicator-wrapper,
    .card-footer,
    .debug-status,
    .btn,
    .form-check {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .estimate-container {
        padding: 0 !important;
        box-shadow: none !important;
    }
    
    .contact-form {
        display: none !important;
    }
}

/* Geometric Linework */
.card {
    position: relative;
}

.card::before, .card::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border-color: rgba(13, 110, 253, 0.3);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.card::before {
    top: -5px;
    left: -5px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.card::after {
    bottom: -5px;
    right: -5px;
    border-bottom: 2px solid;
    border-right: 2px solid;
}

body.dark-mode .card::before, body.dark-mode .card::after {
    border-color: rgba(52, 152, 219, 0.4);
}

body.dark-mode .step-content span {
    color: #e8e8e8 !important;
}

body.dark-mode .door-counts-info-box .form-text,
body.dark-mode .paint-section .form-text,
body.dark-mode .estimate-section p,
body.dark-mode .form-label small.text-muted,
body.dark-mode .text-muted {
    color: #e8e8e8 !important;
}

body.dark-mode .popular-badge-custom {
    color: rgb(0, 0, 0) !important;
}

/* Dark Mode Fixes */
body.dark-mode, 
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5,
body.dark-mode p, body.dark-mode li, body.dark-mode span, body.dark-mode label,
body.dark-mode .form-label, body.dark-mode .form-check-label, body.dark-mode .step-content p {
    color: #e8e8e8 !important;
}

body.dark-mode .section-info-box, body.dark-mode .door-counts-info-box {
    color: #111010 !important;
}
        
body.dark-mode .tip-box {
    color: #e8e8e8 !important;
}

body.dark-mode .section-container {
    border-color: #444;
}

body.dark-mode .section-header h4 {
    color: #fff;
}

body.dark-mode .door-style-card {
    background-color: #333;
}

body.dark-mode .door-style-card h5 {
    color: #fff;
}

body.dark-mode .image-upload-container {
    border-color: #555;
}

body.dark-mode .image-upload-container:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .image-upload-container i,
body.dark-mode .image-upload-container p {
    color: #ccc;
}

body.dark-mode .remove-image {
    background: rgba(60, 60, 60, 0.8);
}

body.dark-mode .remove-image i {
    color: #fff;
}

body.dark-mode .cost-item {
    border-bottom-color: #444;
}

body.dark-mode .total-cost {
    border-top-color: #444;
}

body.dark-mode .pricing-disclaimer {
    border-top-color: #444 !important;
    color: #aaa !important;
}

body.dark-mode .section-detail-card {
    background-color: #333;
    border-color: #444;
}

body.dark-mode .btn-secondary {
    background-color: #444;
    border-color: #555;
}

body.dark-mode .btn-secondary:hover {
    background-color: #555;
    border-color: #666;
}

body.dark-mode .form-check-label {
    color: #e8e8e8;
}

body.dark-mode .door-counts-info-box,
body.dark-mode .section-info-box {
    background-color: #333;
    border-color: #444;
    color: #e8e8e8;
}

body.dark-mode .door-counts-info-box h5,
body.dark-mode .section-info-box h5 {
    color: #fff;
}

/* Hardware summary CSS removed - no longer displayed in Step 3 */

/* Video Modal Styling */
.modal-content {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #3cdbc0 0%, #29a08b 100%);
    color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom: none;
}

/* Dark mode video modal header - darker gradient for better white text contrast */
body.dark-mode .modal-header {
    background: linear-gradient(135deg, #1a5f6b 0%, #0d3d4a 100%);
    color: white;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.btn-close {
    filter: brightness(0);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

/* Dark mode close button - white for dark gradient */
body.dark-mode .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 2rem;
}

.modal-footer .btn-primary {
    background-color: #3cdbc0;
    border-color: #3cdbc0;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
}

.modal-footer .btn-primary:hover {
    background-color: #1e8ba8;
    border-color: #1e8ba8;
}

/* Dark mode video modal styling */
body.dark-mode .modal-content {
    background-color: #2d2d2d;
    color: #e8e8e8;
}

body.dark-mode .modal-footer {
    border-top-color: #444;
}

/* Color Selection Styling */
.door-preview-container {
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.door-preview-wrapper {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    width: 75%; /* Reduced by 25% */
    max-width: 300px;
}

.door-preview-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.door-preview-wrapper:hover img {
    transform: scale(1.02);
}

.color-selection-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.color-options-scrollable {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fff;
    width: 50%; /* Reduced by 50% */
    max-width: 300px;
}

.color-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    height: 60px; /* Fixed height for consistent sizing */
}

.color-option:hover {
    border-color: #25facf;
    background-color: #e8f8ff;
    transform: translateX(5px);
}

.color-option.selected {
    border-color: #25facf;
    background-color: #e8f8ff;
    box-shadow: 0 2px 8px rgba(37, 250, 207, 0.3);
}

.color-swatch {
    width: 25%; /* 1/4 of the row width */
    height: 40px; /* Fixed height for square-ish appearance */
    border-radius: 4px; /* Slightly rounded square */
    border: none; /* No border as requested */
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.color-name {
    font-weight: 500;
    color: #333;
    flex-grow: 1;
}

.color-hex {
    display: none; /* Hide hex values on all screen sizes */
}

/* Dark mode color selection */
body.dark-mode .door-preview-wrapper {
    background-color: #2d2d2d;
}

body.dark-mode .color-options-scrollable {
    background-color: #2d2d2d;
    border-color: #444;
}

body.dark-mode .color-option {
    background-color: #333;
    color: #e8e8e8;
}

body.dark-mode .color-option:hover {
    background-color: #404040;
}

body.dark-mode .color-option.selected {
    background-color: #404040;
}

body.dark-mode .color-name {
    color: #e8e8e8;
}

body.dark-mode .color-hex {
    color: #aaa;
}

/* Responsive adjustments */

/* Desktop (PC) - 1200px and up */
@media (min-width: 1200px) {
    .color-selection-phase .row {
        align-items: center;
    }
    
    .color-selection-container {
        justify-content: center;
    }
    
    .door-preview-container {
        justify-content: center;
    }
}

/* Tablet Landscape - 768px to 1199px */
@media (min-width: 768px) and (max-width: 1199px) {
    .color-selection-phase .row {
        align-items: center;
    }
    
    .color-options-scrollable {
        width: 60%;
        max-width: 350px;
    }
    
    .door-preview-wrapper {
        width: 80%;
        max-width: 280px;
    }
}

/* Tablet Portrait and Phone - up to 767px */
@media (max-width: 767px) {
    .color-selection-phase .col-lg-6 {
        order: 1 !important; /* Reset order for mobile */
    }
    
    .color-selection-phase .col-lg-6.order-lg-2 {
        order: 1 !important; /* Image first on mobile */
    }
    
    .color-selection-phase .col-lg-6.order-lg-1 {
        order: 2 !important; /* List second on mobile */
    }
    
    .color-selection-container {
        padding: 0.5rem; /* Reduced padding */
    }
    
    .color-options-scrollable {
        max-height: 300px;
        width: 95%; /* Increased from 80% to 95% (15% increase) */
        max-width: none;
        padding: 0.5rem; /* Reduced internal padding */
    }
    
    .door-preview-wrapper {
        padding: 1rem;
        margin-bottom: 2rem;
        width: 75%;
        max-width: 250px;
    }
    
    /* Hide hex values on phone */
    .color-hex {
        display: none;
    }
}

/* Phone Landscape - up to 767px height */
@media (max-width: 767px) and (orientation: landscape) {
    .color-selection-phase .col-lg-6 {
        order: unset !important; /* Use default order for landscape */
    }
    
    .color-selection-phase .col-lg-6.order-lg-2 {
        order: 2 !important; /* Image right on landscape */
    }
    
    .color-selection-phase .col-lg-6.order-lg-1 {
        order: 1 !important; /* List left on landscape */
    }
    
    .color-options-scrollable {
        width: 70%;
        max-height: 250px;
    }
    
    .door-preview-wrapper {
        width: 70%;
        max-width: 200px;
    }
} 

/* Footer Styles */
.site-footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo-img {
    height: 40px;
    margin-bottom: 10px;
}

.footer-logo h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-newsletter {
    flex: 1;
    min-width: 300px;
}

.footer-newsletter h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.footer-newsletter p {
    margin: 0 0 15px 0;
    color: #cccccc;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #333;
    color: #ffffff;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: #3cdbc0;
}

.newsletter-form .btn-primary {
    padding: 10px 20px;
    background-color: #3cdbc0;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.newsletter-form .btn-primary:hover {
    background-color: #29a08b;
}

.newsletter-message {
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    color: #888;
}

.disclaimer-text {
    font-size: 0.8rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.footer-bottom p {
    margin: 5px 0;
}

/* Dark mode adjustments for footer */
body.dark-mode .site-footer {
    background-color: #0a0a0a;
    border-top: 1px solid #333;
}

body.dark-mode .footer-bottom {
    border-top-color: #222;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-logo,
    .footer-links,
    .footer-newsletter {
        min-width: 100%;
        flex: none;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"] {
        margin-bottom: 10px;
    }
}

/* === 2025-07-16 Estimate Output UI Fixes === */
.alert-success.text-dark {
    color: #000 !important;
}

#project-info-content {
    width: 100% !important;
    display: block !important;
}

.section-detail-card {
    width: 100% !important;
}

/* === 2025-07-16 Paint Removal & Label Color === */
.paint-section { display: none !important; }

.form-label { color: #000 !important; }
body.dark-mode .form-label { color: #3cdbc0 !important; }

body.dark-mode #project-info-content, body.dark-mode #project-info-content * { color: #ffffff !important; }

.section-image.placeholder-img { min-height: 160px; background-color: #e9ecef; display:flex; align-items:center; justify-content:center; }
body.dark-mode .section-image.placeholder-img { background-color: #444; }

body.dark-mode .alert-success.text-dark { color:#000 !important; }
#project-info-content { max-width: 50% !important; margin: 0 auto !important; }

/* --- CRITICAL FIX: Door Style Images --- */
/* This section contains critical fixes for door style images to prevent color issues */

/* Reset all image properties to defaults */
#door-styles-container img,
.door-style-card img,
.card-img-top,
[class*="door-style"] img {
    filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -o-filter: none !important;
    -ms-filter: none !important;
    background-color: transparent !important;
    background-image: none !important;
    background: none !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    image-rendering: auto !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    object-fit: contain !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
}

/* Override any parent container effects */
#door-styles-container,
.door-style-card,
#door-styles-container img,
#door-styles-container h5,
.door-style-card img,
.door-style-card h5 {
    filter: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -o-filter: none !important;
    -ms-filter: none !important;
    background-color: transparent !important;
    mix-blend-mode: normal !important;
}

/* Override any Bootstrap overrides */
.card-img-top {
    filter: none !important;
    -webkit-filter: none !important;
    background-color: transparent !important;
    mix-blend-mode: normal !important;
}

/* Ensure SVG elements don't get affected */
#door-styles-container svg,
.door-style-card svg {
    filter: none !important;
    -webkit-filter: none !important;
}

/* Fix for Firefox */
@-moz-document url-prefix() {
    #door-styles-container img,
    .door-style-card img {
        filter: none !important;
        -webkit-filter: none !important;
    }
}

/* Fix for Safari */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        #door-styles-container img,
        .door-style-card img {
            -webkit-filter: none !important;
            filter: none !important;
        }
    }
}

/* Fix for Chrome */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    #door-styles-container img,
    .door-style-card img {
        -webkit-filter: none !important;
        filter: none !important;
    }
}

/* End of critical fixes */

/* The definitive popular badge styling has been moved to calculator-fixes.css */
