/* Door Questionnaire Styles */

/* Button styling */
#door-questionnaire-button {
    position: fixed;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #FF7100, #FF8F40);
    color: white;
    padding: 5px 12px;
    /* border-radius: 8px; */
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 0.5px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 113, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    /* position: relative; /* Add relative positioning for absolute child */
}

#door-questionnaire-button:hover {
    background: linear-gradient(135deg, #e66700, #FF7100);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 113, 0, 0.4);
}

/* Dismiss icon styling */
#door-questionnaire-dismiss {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid white;
    font-weight: bold;
}

#door-questionnaire-dismiss:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Progress bar styling */
.progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin: 0 0 20px 0;
    height: 8px;
    overflow: hidden;
    
}

.progress-bar {
    height: 100%;
    background-color: #009600 !important; /* Changed from #FF7100 (orange) to #009600 (green) */
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Questionnaire container */
#door-questionnaire-container {
    position: fixed;
    top: 0;
    right: -620px; /* Changed from -400px to -620px to ensure it's fully hidden when closed */
    width: 500px; /* Changed from 380px to 600px to make the container wider */
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    
}

#door-questionnaire-container.open {
    right: 0;
}

/* Header styling */
#door-questionnaire-header {
    background-color: #5e5351;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#door-questionnaire-header h2 {
    margin: 0;
    font-size: 20px;
}

#door-questionnaire-close {
    font-size: 24px;
    cursor: pointer;
}

/* Content styling */
#door-questionnaire-content {
    padding: 20px;
}

.question {
    margin-bottom: 30px;
}

/* Question heading and paragraph styling */
.question h3 {
    color: #5e5351;
    margin-bottom: 0px;
    font-size: 22px;
    font-weight: lighter;
}

.question p {
    color: #5e5351;
    font-size: 15px;
    line-height: 1.1;
    margin-bottom: 20px;
    margin-top: 0px !important;
    
    
}

/* Options styling */
.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    padding: 12px 15px;
    background-color: #f8f4ee;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    background-color: #efe9e2;
}

.option.selected {
    background-color: #FF7100;
    color: white;
    border-color: #e66700;
}

.option.selected span {
    color: white;
}

/* Image options styling */
.option-with-image {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 10px;
}

.option-with-image span {
    font-size: 16px;
    color: #5e5351;
    text-align: left;
    font-weight: bolder;
    width: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.option-image {
    width: 100%;
    /* width: 150px; */
    /* height: 150px; */
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 480px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* Results container */
#results-container {
    margin-top: 20px;
}

#recommended-doors {
    display: grid;
    grid-template-columns: 1fr; /* Changed from 3 columns to 1 column to show doors one per row */
    gap: 20px;
    margin-top: 15px;
    padding-bottom: 10px;
}

.door-card {
    border: none;
    /* border-radius: 10px; */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
    height: 100%;
    position: relative;
}

.door-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.door-card img {
    padding: 8px;
    width: 100%;
    height: 170px;
    object-fit: contain;
    border-bottom: none;
    /* background-color: #f8f8f8; */
}



.door-info h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.door-price {
    color: #009600;
    font-weight: bold;
    font-size: 18px;
    margin-top: auto;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

/* Match percentage styling */


/* Match percentage color variations based on score */
.door-card[data-match="high"] .match-percentage {
    background: linear-gradient(135deg, #009600, #00b300);
}

.door-card[data-match="medium"] .match-percentage {
    background: linear-gradient(135deg, #FF7100, #FF9040);
}

.door-card[data-match="low"] .match-percentage {
    background: linear-gradient(135deg, #777777, #999999);
}

.door-link {
    display: block;
    text-align: center;
    background-color: #FF7100;
    color: white !important; 
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    /* transition: all 0.2s ease; */
    margin-top: 5px;
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
    /* box-shadow: 0 2px 6px rgba(255, 113, 0, 0.25); */
    width: 100%;
}

.door-link:hover {
    background-color: #e66700;
    box-shadow: 0 4px 8px rgba(255, 113, 0, 0.35);
    transform: translateY(-2px);
}

/* For better display on mobile or small screens */
@media (max-width: 380px) {
    #recommended-doors {
        grid-template-columns: 1fr;
    }
    
    .door-card img {
        height: 140px;
    }
}

/* Navigation container styling */
.navigation-container {
    margin-bottom: 15px;
}

.nav-button-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.nav-button-wrapper button {
    background-color: #5e5351;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.nav-button-wrapper button:hover {
    background-color: #4a423f;
}

/* Keep buttons balanced - previous button on left, reset on right */
#previous-question {
    flex: 1;
}

#reset-questionnaire {
    flex: 1;
}

/* Remove old styles that are no longer needed */
/* Reset button styling */
.reset-button-container {
    display: none;
}

/* Navigation buttons styling */
.navigation-buttons {
    display: none;
}

/* For better display on mobile or small screens */
@media (max-width: 380px) {
    #recommended-doors {
        grid-template-columns: 1fr;
    }
    
    .door-card img {
        height: 140px;
    }
}

.button-container {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
}

#restart-questionnaire, #back-to-questions {
    background-color: #5e5351;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

#restart-questionnaire:hover, #back-to-questions:hover {
    background-color: #4a423f;
}

/* Show more button styling */
.show-more-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.show-more-button {
    background: linear-gradient(135deg, #FF7100, #FF8F40);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 113, 0, 0.3);
    text-align: center;
}

.show-more-button:hover {
    background: linear-gradient(135deg, #e66700, #FF7100);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 113, 0, 0.4);
}