/* ============================================================
   A Great Choice - Residential Services Estimator
   Compatible with Bootstrap 3.3.6
   ============================================================ */

/* ---- Progress Bar (custom classes to avoid theme interference) ---- */
.agc-progress-wrap {
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.agc-progress-fill {
    background-color: #669D08;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    line-height: 28px;
    transition: width 0.5s ease;
    text-align: center;
    height: 100%;
    float: left;
}

.agc-progress-fill .progress-label {
    display: block;
    line-height: 28px;
}

/* ---- Step Indicators ---- */
.step-indicators {
    padding: 8px 0;
}

.step-indicators .step-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #d4d4d4;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.step-indicators .step-dot.active {
    background-color: #669D08;
    transform: scale(1.3);
}

.step-indicators .step-dot.completed {
    background-color: #005825;
}

/* ---- Tab Content Area ---- */
.estimator-tab-content {
    border: 1px solid #ddd;
    border-top: 3px solid #669D08;
    border-radius: 0 0 4px 4px;
    padding: 30px 25px;
    background-color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.step-title {
    color: #333;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 22px;
}

.step-title i {
    color: #669D08;
}

/* ---- Category Cards (Step 1) ---- */
.category-option,
.service-option {
    position: relative;
    border: 2px solid #e2e2e2;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Force clicks to hit the parent wrapper, not child elements */
.category-option > *,
.service-option > * {
    pointer-events: none;
}

.category-option:hover,
.service-option:hover {
    border-color: #aac873;
    background-color: #fbfdf7;
    box-shadow: 0 2px 8px rgba(102, 157, 8, 0.12);
}

.category-option.selected,
.service-option.selected {
    border-color: #669D08;
    background-color: #f0f7e4;
    box-shadow: 0 0 0 3px rgba(102, 157, 8, 0.2);
}

.category-option h4 {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.category-option p {
    margin-bottom: 0;
    line-height: 1.3;
}

/* ---- Checkmark Badge ---- */
.select-checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    background-color: #669D08;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease-in-out;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.category-option.selected .select-checkmark,
.service-option.selected .select-checkmark {
    opacity: 1;
    transform: scale(1);
}

.service-option .select-checkmark {
    width: 22px;
    height: 22px;
    font-size: 10px;
}

/* ---- Card Image Wrapper ---- */
.card-img-wrap {
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.card-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Force consistent aspect ratio on service cards */
.service-card-grid .card-img-wrap {
    height: 0;
    padding-bottom: 62%;
    position: relative;
    overflow: hidden;
}

.service-card-grid .card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Service Card Text ---- */
.service-option h6 {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 12px;
    color: #444;
    line-height: 1.3;
    min-height: 32px;
}

/* ---- Follow-Up Questions ---- */
.followup-section {
    background: #f9faf6;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid #e8edd9;
}

.followup-section h4 {
    color: #333;
    font-weight: 600;
    font-size: 17px;
}

.followup-section label.control-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

/* ---- Button Option Groups ---- */
.btn-group-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-group-wrap .btn-option {
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    transition: all 0.2s ease;
    white-space: normal;
    text-align: left;
}

.btn-group-wrap .btn-option:hover {
    border-color: #aac873;
    background-color: #fbfdf7;
    color: #333;
}

.btn-group-wrap .btn-option:focus {
    outline: none;
    box-shadow: none;
}

.btn-group-wrap .btn-option.active {
    border-color: #669D08;
    background-color: #f0f7e4;
    color: #333;
    font-weight: 600;
}

/* ---- Estimator Navigation ---- */
.estimator-nav {
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.estimator-back-btn {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #555;
    font-weight: 500;
}

.estimator-back-btn:hover {
    background-color: #e8e8e8;
    color: #333;
}

/* ---- Form Fields (Contact Step) ---- */
#step-contact .form-control {
    background-color: #fff !important;
    border-radius: 4px;
}

#step-contact .form-control:focus {
    border-color: #669D08;
    box-shadow: 0 0 0 2px rgba(102, 157, 8, 0.15);
}

#step-contact .help-block {
    font-size: 12px;
    margin-top: 4px;
}

/* Override global link color inside estimator */
.estimator-tab-content a {
    color: #005825;
    text-decoration: none;
    font-weight: normal;
}

/* ---- Submit Button ---- */
#submitEstimate {
    background-color: #669D08;
    border-color: #5a8a07;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 30px;
}

#submitEstimate:hover {
    background-color: #5a8a07;
    border-color: #4e7806;
}

#submitEstimate:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ---- Alerts ---- */
#estimateSuccess,
#estimateError {
    border-radius: 6px;
    padding: 20px;
}

#estimateSuccess h4,
#estimateError h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

/* ---- Honeypot (matches existing site class) ---- */
.uhohwgpk {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .estimator-tab-content {
        padding: 20px 15px;
    }

    .category-option h4 {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .estimator-tab-content {
        padding: 15px 12px;
    }

    .step-title {
        font-size: 18px;
    }

    .category-option,
    .service-option {
        padding: 10px;
    }

    .category-option h4 {
        font-size: 15px;
    }

    .service-option h6 {
        font-size: 11px;
        min-height: 28px;
    }

    .btn-group-wrap .btn-option {
        font-size: 12px;
        padding: 7px 10px;
    }

    .estimator-nav .btn-lg {
        font-size: 14px;
        padding: 8px 18px;
    }

    .followup-section {
        padding: 15px;
    }

    #submitEstimate {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .btn-group-wrap {
        gap: 5px;
    }

    .btn-group-wrap .btn-option {
        font-size: 11px;
        padding: 6px 8px;
    }

    .service-card-grid .col-sm-6 {
        width: 50%;
    }
}

/* ---- Utility overrides for spacing inside estimator ---- */
.mb-5  { margin-bottom: 5px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-30 { margin-bottom: 30px !important; }
.mt-5  { margin-top: 5px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-20 { margin-top: 20px !important; }
.mr-5  { margin-right: 5px !important; }
.mr-10 { margin-right: 10px !important; }
.ml-10 { margin-left: 10px !important; }