/* =========================================================
   FAQ Nested Accordions (Custom Post Type)
========================================================= */

.falcon-nested-faqs-wrapper {
    width: 100%;
    font-family: inherit;
}

/* --- Outer Accordion (Categories like "General") --- */
.faq-category-details {
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
}

.faq-category-summary {
    cursor: pointer;
    font-size: 18px;
    font-weight: 300;
    color: #000;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; 
}

/* Hide default marker in Safari/Chrome */
.faq-category-summary::-webkit-details-marker {
    display: none;
}

/* Custom SVG Down Arrow (Outer) */
.faq-category-summary::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    /* URL-encoded version of your provided SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10' fill='none'%3E%3Cpath d='M17 1L9 9L1 0.999999' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
    margin-left: 15px;
}

/* Rotate arrow when open */
.faq-category-details[open] > .faq-category-summary::after {
    transform: rotate(180deg);
}

.faq-category-content {
    margin-top: 20px;
    padding-bottom: 10px;
}


/* --- Inner Accordion (Specific Questions) --- */
.faq-question-details {
    margin-bottom: 10px;
    border: 1px solid #eaeaea;
    padding: 15px 20px;
    border-radius: 14px;
    background: #ffffff;
}

.faq-question-summary {
    cursor: pointer;
    font-weight: 400;
    font-size: 16px;
    color: #333;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.faq-question-summary::-webkit-details-marker {
    display: none;
}

.faq-question-summary::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10' fill='none'%3E%3Cpath d='M17 1L9 9L1 0.999999' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
    margin-left: 15px;
    flex: 0 0 10px;
}

.faq-question-details[open] > .faq-question-summary::after {
    transform: rotate(180deg);
}

/* Change font weight to 700 when the category accordion is active/open */
.faq-category-details[open] > .faq-category-summary {
    font-weight: 700;
}

.faq-question-content {
    margin-top: 15px;
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* =========================================================
   Smooth Opening Animation
========================================================= */

/* Triggers the animation only when the details tag is opened */
details[open] summary ~ * {
    animation: faq-slide-down 0.35s ease-out forwards;
}

@keyframes faq-slide-down {
    0% {
        opacity: 0;
        transform: translateY(-15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Contact Forms Accordion
========================================================= */

.falcon-forms-accordion-wrapper {
    width: 100%;
    margin-top: 30px;
    font-family: inherit;
}

.falcon-form-group {
    margin-bottom: 25px;
}

/* --- The Pill Buttons (Summary & Standard Link) --- */
.ff-accordion-summary,
.ff-pill-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border: 1px solid #caced1;
    border-radius: 50px; /* Makes it a pill shape */
    background-color: #ffffff;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    list-style: none;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
}

/* Hide default markers */
.ff-accordion-summary::-webkit-details-marker {
    display: none;
}

/* Custom SVG Down Arrow (Black by default) */
.ff-accordion-summary::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 8px;
    margin-left: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10' fill='none'%3E%3Cpath d='M17 1L9 9L1 0.999999' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
}

/* --- Active / Open State --- */
.ff-accordion-details[open] > .ff-accordion-summary {
    background-color: #596580; /* Dark grey/blue from your design */
    color: #ffffff;
    border-color: #596580;
}

/* Rotate arrow and make it white when open */
.ff-accordion-details[open] > .ff-accordion-summary::after {
    transform: rotate(180deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10' fill='none'%3E%3Cpath d='M17 1L9 9L1 0.999999' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Hide the subtext note if the accordion is open */
.ff-accordion-details[open] + .ff-subtext-note {
    display: none;
}

/* --- Expanded Content Styling --- */
.ff-accordion-content {
    margin-top: 20px;
    animation: faq-slide-down 0.35s ease-out forwards;
}

.ff-intro-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 20px;
}

.ff-form-container {
    background: #fafafa;
    border-radius: 8px;
    padding: 30px;
    border: 1px solid #f0f0f0;
}

.ff-form-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #000;
}

/* --- Small text elements --- */
.ff-subtext-note {
    margin-top: 10px;
    font-size: 13px;
    color: #000;
}

.ff-subtext-note a {
    text-decoration: underline;
    color: #000;
}

.ff-subtext-paragraph {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

@media screen and (max-width:767px) {
    .ff-accordion-summary,
    .ff-pill-button {
        width: 100%;
    }

    .ff-form-container {
        padding: 20px;
    }

    .ff-form-title {
        font-size: 16px;
        font-weight: 500;
    }
}

/* =========================================================
   Contact Form 7 Grid Styling
========================================================= */

.ff-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.ff-form-row {
    width: 100%;
}

/* Two Column Layout */
.ff-form-row.two-col {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Allows stacking on mobile */
}

.ff-form-col {
    flex: 1;
    min-width: 250px; /* Forces columns to stack on small screens */
}

/* Labels & Tooltips */
.ff-form-row label {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #322F2D;
    margin-bottom: 8px;
    font-weight: 400;
    gap: 10px;
}

.ff-tooltip-icon {
    display: inline-flex;
    margin-left: 6px;
    cursor: help;
}

/* Input Fields */
.ff-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #b2b2b2 !important;
    border-radius: 10px !important;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease;
}

.ff-input:focus {
    border-color: #4a5265;
}

select.ff-input {
    /* 1. Remove the browser's default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* 2. Add our own clean SVG arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    
    /* 3. Position the arrow exactly where we want it (e.g., 20px from the right edge) */
    background-position: right 15px center;
    background-size: 14px;
    
    /* 4. Add extra padding on the right so long text doesn't overlap the arrow */
    padding-right: 45px;
}

/* Fix for IE/Edge to hide their native arrow */
select.ff-input::-ms-expand {
    display: none;
}

/* Radio Buttons (Yes / No) */
.ff-form-row.inline-radio {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ff-radio-group .wpcf7-list-item {
    margin: 0 10px 0 0;
}

/* Submit Button */
.ff-submit-btn {
    width: 100%;
    background-color: #000;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.ff-submit-btn:hover {
    background-color: #333;
}

/* --- Basic File Upload Styling (Fallback) --- */
.ff-file-upload-wrapper {
    position: relative;
    border: 1px dashed #caced1;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    background-color: #fff;
    overflow: hidden;
}

/* 1. Force the sneaky CF7 wrapper span to fill the whole box */
/* The main dashed container */
.ff-file-upload-wrapper {
    position: relative; /* THIS KEEPS THE ABSOLUTE INPUT TRAPPED INSIDE */
    border: 1px dashed #caced1;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
    overflow: hidden;
    margin-bottom: 10px;
}

.ff-file-upload-wrapper .wpcf7-form-control-wrap {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* 2. Make the actual input fill the new span size */
.ff-file-input {
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ff-file-upload-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none; /* Lets clicks pass through to the hidden input */
}

.ff-file-upload-ui .upload-title {
    font-size: 14px;
    color: #999;
}

.ff-file-upload-ui .upload-desc {
    font-size: 11px;
    color: #b3b3b3;
}

input.ff-submit-btn {
    background: #000 !important;
    border: 1px solid #000 !important;
    text-transform: none;
    letter-spacing: normal;
    font-size: 16px;
    font-weight: 500;
}

input.ff-submit-btn:hover {
    background: #fff !important;
    border: 1px solid #000 !important;
    color: #000;
}

/* --- CTA Block Spacing --- */
.ff-cta-block {
    margin-top: 30px;
}

.wpcf7-form-control.wpcf7-checkbox {
    display: flex;
    flex-direction: column;
}

.wpcf7-list-item {
    margin: 0;
}

/* --- File Preview Area (Below Upload Box) --- */
.ff-file-preview-container {
    margin-top: 15px;
    display: none; /* Hidden completely until a file is selected */
    flex-direction: column;
    gap: 10px;
}

.ff-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    padding: 12px 18px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
}

.ff-file-item-name {
    font-weight: 600;
    word-break: break-all;
    margin-right: 15px;
}

.ff-file-remove {
    background: none;
    border: none;
    color: #d9534f; /* A standard alert red */
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    transition: color 0.2s ease;
    outline: none;
}

.ff-file-remove:hover {
    color: #c9302c;
    text-decoration: underline;
}

@media screen and (max-width: 767px) {
    .ff-form-row.inline-radio {
        display: flex;
        align-items: start;
        gap: 10px;
        flex-direction: column;
    }
}
/* =========================================================
   Need To Talk To Our Team Modal
========================================================= */

/* Active state for the button */
.ff-cta-toggle.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
    outline: none !important;
}

.ff-cta-toggle {
    outline: none !important;
}

button:focus {
    outline: none !important;
}

/* Modal Container */
.ff-cta-modal {
    display: none; /* Hidden until toggled via JS */
    background-color: #FAFAFA;
    padding: 35px 30px;
    border-radius: 8px;
    margin-top: 25px;
    animation: faq-slide-down 0.3s ease-out forwards;
    max-width: 800px;
}

.ff-cta-modal.active {
    display: block;
}

.ff-cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.ff-cta-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* Rounded border box around the SVG icons */
.ff-icon-box {
    width: 38px;
    height: 38px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    flex-shrink: 0;
}

/* Restrict SVG size so they fit cleanly inside the box */
.ff-icon-box svg {
    max-width: 18px;
    max-height: 18px;
}

/* Text formatting */
.ff-cta-text {
    display: flex;
    flex-direction: column;
}

.ff-cta-text strong {
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
    font-size: 15px;
}

.ff-cta-text span {
    font-size: 13px;
    color: #666;
}

/* Responsive: Stack into 1 column on mobile devices */
@media (max-width: 768px) {
    .ff-cta-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CF7 Custom Radio Buttons (Yes/No Pill Style)
========================================================= */

/* Ensure the container is aligned */
.ff-radio-group .wpcf7-form-control {
    display: flex;
    gap: 15px;
}

/* Hide the actual default radio circles entirely */
.ff-radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Style the text label to look like the unselected "No" button */
.ff-radio-group .wpcf7-list-item-label {
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none; /* Prevents text highlighting when clicking fast */
}

/* Style the label when its hidden radio input is checked (The black "Yes" state) */
.ff-radio-group input[type="radio"]:checked + .wpcf7-list-item-label {
    background-color: #000;
    color: #fff;
    border-color: #000;
    font-weight: 500;
}

/* Add a subtle hover effect for unselected buttons */
.ff-radio-group input[type="radio"]:not(:checked) + .wpcf7-list-item-label:hover {
    border-color: #000;
}

/* Remove default margin that CF7 adds to list items */
.ff-radio-group .wpcf7-list-item {
    margin: 0;
}

/* Styling for the new hint text next to the tooltip */
.ff-label-hint {
    color: #b2b2b2;
    font-size: 11px;
    font-weight: 400;
}

/* =========================================================
   Tooltip Pop-Up Modal
========================================================= */

/* Make the tooltip icon explicitly clickable */
.ff-tooltip-icon {
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.ff-tooltip-icon:hover {
    opacity: 0.7;
}

/* The dark background overlay */
.ff-tooltip-modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 99999; /* Ensures it sits above Elementor headers/menus */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Active state for JS toggle */
.ff-tooltip-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* The white modal box */
.ff-tooltip-modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.ff-tooltip-modal-overlay.active .ff-tooltip-modal-content {
    transform: translateY(0);
}

.ff-tooltip-modal-content p {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
    color: #000;
    margin-top: 0;
    text-align: left;
}

.ff-tooltip-modal-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 25px;
    display: block;
    border: 1px solid #eaeaea; /* Optional, adds a subtle frame */
}

/* The Black Close Button */
.ff-tooltip-modal-close {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000;
    padding: 14px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
    text-transform: none;
    letter-spacing: normal;
}

.ff-tooltip-modal-close:hover {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

/* =========================================================
   Product Issue Subtext Modal
========================================================= */

.ff-issue-toggle {
    display: inline-flex;
    align-items: center;
    color: #000;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ff-issue-toggle:hover {
    color: #4a5265;
}

.ff-issue-modal {
    display: none; /* Hidden by default */
    background-color: #FAFAFA;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.5;
    animation: faq-slide-down 0.3s ease-out forwards;
}

/* Active state triggered by JS */
.ff-issue-modal.active {
    display: block;
}

.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.payment-required .wpcf7-response-output {
    color: #ff8000;
    border: none;
    margin-top: 0;
    font-size: 12px;
}

.wpcf7-spinner {
    visibility: hidden;
    display: block;
    background-color: #23282d;
    opacity: 0.75;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 100%;
    padding: 0;
    margin: 10px auto 0;
    position: relative;
    align-self: center;
}

.wpcf7-not-valid-tip {
    font-size: 12px;
}

/* Target the specific Conditional Field group wrapper */
div[data-id="group-service-request"] {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ff-icon-box svg {
    width: 18px;
    height: 18px;
    display: block; /* Helps Safari paint the SVG correctly */
    flex-shrink: 0; /* Prevents Safari from crushing it */
}

/* FAQ Search Bar Styling */
.falcon-faq-search-wrapper {
    position: relative;
    margin-bottom: 30px;
    width: 100%;
}

.falcon-faq-search-wrapper .faq-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.falcon-faq-search-wrapper #faqSearchInput {
    padding-left: 45px; /* Make room for the magnifying glass */
}

/* FAQ Empty State Styling */
.faq-empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
    margin-top: 20px;
}

.faq-empty-state h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #111;
}

.faq-empty-state p {
    margin: 0;
    color: #555;
}

#faqClearSearch {
    text-transform: capitalize;
    font-size: 10px;
    font-weight: 400;
}