/* ==========================================
   1. BODY SCROLL LOCK
   ========================================== */
body.modal-open {
    overflow: hidden !important; /* Prevents background site from scrolling */
    height: 100vh;
}

/* ==========================================
   2. FOOTER MAIN STYLES
   ========================================== */
.footer {
    background: #062940;
    color: #fff;
    padding: 20px 10px;
    border-top: 4px solid #ffd166;
    margin-top: 32px;
    font-size: 0.95rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    text-align: center;
}

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

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #ffd166;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a, 
.footer-a {
    color: #fff;
    text-decoration: none;
    transition: text-decoration 0.3s;
}

.footer-section a:hover {
    text-decoration: underline;
}

/* Gas Safe & Logo Handling */
.gas-safe {
    text-align: center;
}

.gas-safe-logo {
    display: block;
    margin: 0 auto 8px;
    height: 50px;
    object-fit: contain;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-logo {
    height: 80px;
    max-height: 100px;
    margin-bottom: 12px;
    object-fit: contain;
}

/* ==========================================
   3. MODAL OVERLAY & CONTENT BOX
   ========================================== */
.call-modal {
    display: none; /* Controlled by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;     /* Centers the box vertically */
    justify-content: center;  /* Centers the box horizontally */
    padding: 15px;            /* Gap for mobile edges */
}

.call-modal-content {
    background-color: #fffaf5;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;        /* Keeps box inside screen viewport */
    overflow-y: auto;        /* ENABLES INTERNAL SCROLLING */
    border-radius: 15px;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
}

/* ==========================================
   4. MODAL HEADER & BRANDING
   ========================================== */
.call-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-brand-name {
    font-weight: bold;
    color: #062940;
    font-size: 1.2rem;
}

.call-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

/* ==========================================
   5. MODAL TITLES & LEFT ALIGNMENT
   ========================================== */
.modal-title-single {
    display: block;
    text-align: left !important;
    font-size: 1.6rem;
    font-weight: bold;
    color: #062940;
    margin-bottom: 25px;
    position: relative;
    width: 100%;
}

/* Decorative Line - Matching Site Reference */
.modal-title-single::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 140px;
    height: 3px; /* Clean, refined thickness */
    background-color: #2b6777;
}

/* Left Align for all Grey Sub-text (Initial & Thank You states) */
.modal-left-text, 
#modal-thank-you p {
    text-align: left !important;
    color: #666;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: block;
}

/* ==========================================
   6. CALLBACK FORM & INPUTS
   ========================================== */
#footer-callback-form fieldset {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

#footer-callback-form label {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333;
}

#footer-callback-form input, 
#footer-callback-form select, 
#footer-callback-form textarea {
    width: 100% !important;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

/* ==========================================
   7. BUTTONS (Primary & Neutral Grey)
   ========================================== */
.call-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.btn.primary { background-color: #2b6777; color: white; }
.btn.danger  { background-color: #c84b31; color: white; }

.btn.primary, .btn.danger {
    padding: 14px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

/* Neutral Grey Buttons (Back & Close) */
.btn.secondary, 
.btn.close, 
.modal-close-trigger {
    background-color: #e9e9e9 !important; /* Visible grey */
    color: #333 !important;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-block;
    text-align: center;
}

.btn.secondary:hover, 
.btn.close:hover, 
.modal-close-trigger:hover {
    background-color: #d8d8d8 !important; /* Darker grey on hover */
    color: #000 !important;
}

/* ==========================================
   8. FLOATING BUTTONS & RESPONSIVE
   ========================================== */
.back-to-top {
    position: fixed;
    right: 25px;
    z-index: 1000;
    transition: all 0.4s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    bottom: 100px;
    background: #ff9900;
    color: #fff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    opacity: 0;
    pointer-events: none;
}

.back-to-top.show { opacity: 1; pointer-events: auto; }

.floating-book-btn:hover, .back-to-top:hover {
    background: #e68a00;
    transform: translateY(-3px);
}


@media (max-width: 768px) {
    .footer-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 20px;
        text-align: center;
    }
    .footer-section { width: 100%; min-width: 0; max-width: none; }
    .footer-section.gas-safe { grid-column: 1 / -1; }
    .footer-logo { height: 60px; }
    .modal-title-single { font-size: 1.3rem; white-space: normal; }
    
    .call-modal-content {
        padding: 20px;
        max-height: 85vh; /* Tighter fit for mobile landscape/small screens */
    }
}

/* Branded Header & Footer */
.feedback-site-header {
    background: #062940;
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 4px solid #ffd166;
}
.header-container h1 { font-size: 1.4rem; margin-top: 10px; }

.feedback-site-footer {
    text-align: center;
    padding: 30px;
    font-size: 0.85rem;
    color: #666;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    margin-top: 50px;
}

/* Fieldset Styling for Ratings */
.rating-fieldset {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    background: #fdfdfd;
}
.rating-fieldset legend {
    font-weight: bold;
    padding: 0 10px;
    color: #2b6777;
    font-size: 1.1rem;
}

/* Review Summary */
.review-summary-box {
    background: #f0f4f7;
    padding: 20px;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #d1d9e0;
}
.summary-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e6ed;
    padding-bottom: 8px;
}
.summary-item strong { display: block; font-size: 0.8rem; color: #2b6777; text-transform: uppercase; }
.summary-item span { font-size: 1rem; color: #333; }

/* Success State */
.success-message { text-align: center; padding: 40px 0; }
.success-icon { font-size: 4rem; display: block; margin-bottom: 20px; }

/* General spacing */
.hint { font-size: 0.85rem; color: #777; margin-bottom: 20px; }
.row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media(min-width: 600px) { .row { grid-template-columns: 1fr 1fr; } }
