/* ================================================================
   Fibre Check Coverage Widget — fibre-check-coverage.css
   FBB - Fibre Check Coverage
   ================================================================ */

/* ── Widget shell ─────────────────────────────────────────────── */
.fcc-widget {
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 60px;
}
.widget-fibre-check-coverage .fcc-widget {
        min-height: auto;
}

.fcc-widget .fcc-search-wrap, .fcc-widget .fcc-cant-find {
    max-width: 720px; 
}

/* ── Page Header ──────────────────────────────────────────────── */
.fcc-header {
    padding: 40px 0 24px;
    text-align: center;
}

.fcc-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* ── Property Type Tabs ───────────────────────────────────────── */
.fcc-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
}

.fcc-tab {
    background: none;
    border: none;
    padding: 8px 16px 12px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #4D4D4D;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    border-bottom: 1px solid #E6E6E6;
}

.fcc-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s;
}

.fcc-tab.active {
    color: #E86900;
    font-weight: 600;
}

.fcc-tab.active::after {
    background: #E86900;
}

.fcc-tab:hover {
    color: #e87722;
}

/* ── Search Bar ───────────────────────────────────────────────── */
.fcc-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 15px;
    border-radius: 18px;
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.12);
    margin: auto;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

.fcc-search-box {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F9F8F8;
    border: 1px solid #E6E6E6;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 40px;
    padding: 0 16px;
    box-sizing: border-box;
}

.fcc-search-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat center / contain;
}

.fcc-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    background: transparent;
    width: 100%;
}

.fcc-search-input::placeholder {
    color: #999;
}

.fcc-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FF7300;
    border: none;
    border-radius: 24px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    height: 40px;
    padding: 0 20px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.fcc-search-btn:hover {
    background: #d06318;
}

/* ── Loading ──────────────────────────────────────────────────── */
.fcc-loading {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 14px;
}

/* ── Results Area ─────────────────────────────────────────────── */
.fcc-cant-find {
    font-size: 13px;
    color: #555;
    padding: 4px 0 30px;
    margin: auto;
}

.fcc-cant-find a {
    color: #e87722;
    text-decoration: underline;
}

.fcc-results-count {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.fcc-results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #fff;
}

.fcc-results-table thead tr {
    background: #e87722;
}

.fcc-results-table thead th {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid #F2F2F2;
}

.fcc-results-table thead th:last-child {
    width: 110px;
    text-align: right;
}

.fcc-results-table tbody tr {
    transition: background 0.15s;
}

.fcc-results-table tbody tr:hover {
    background: #fdf4ec;
}

.fcc-results-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
    border: 1px solid #E6E6E6;
}

.fcc-results-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.fcc-register-btn {
    display: inline-block;
    padding: 7px 18px;
    border: 1.5px solid #e87722;
    border-radius: 20px;
    color: #e87722;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.fcc-register-btn:hover {
    background: #e87722;
    color: #fff;
}

/* ── Get Notified Form ────────────────────────────────────────── */
.fcc-notify-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-top: 16px;
}

.fcc-notify-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px;
    text-align: center;
}

/* Dynamic Form widget embedded via Squidex defaultFormId */
.fcc-notify-dynamic-form .widget-container {
    max-width: 100%;
    margin: 0 auto;
}

.fcc-notify-dynamic-form .widget-header {
    display: none;
}

/* ── Form Fields ──────────────────────────────────────────────── */
.fcc-field {
    margin-bottom: 18px;
}

.fcc-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
}

.fcc-field--half {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.fcc-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.fcc-required {
    color: #d32f2f;
    margin-left: 2px;
}

.fcc-notify-card input[type="text"],
.fcc-notify-card input[type="email"],
.fcc-notify-card input[type="tel"] {
    width: 100%;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.fcc-notify-card input:focus {
    border-color: #e87722;
    box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.12);
}

.fcc-notify-card input.fcc-error,
.fcc-select-wrap select.fcc-error {
    border-color: #d32f2f;
}

.fcc-notify-card input::placeholder {
    color: #aaa;
}

.fcc-select-wrap {
    position: relative;
}

.fcc-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    pointer-events: none;
}

.fcc-select-wrap select {
    appearance: none;
    width: 100%;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 36px 0 14px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.fcc-select-wrap select:focus {
    border-color: #e87722;
    box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.12);
}

.fcc-select-wrap select option[value=""] {
    color: #aaa;
}

/* ── Privacy Notice ───────────────────────────────────────────── */
.fcc-privacy {
    font-size: 13px;
    color: #555;
    margin: 8px 0 20px;
    text-align: center;
}

.fcc-privacy a {
    color: #e87722;
    text-decoration: underline;
}

/* ── Submit Button ────────────────────────────────────────────── */
.fcc-submit-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.fcc-submit-btn {
    background: #e87722;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 13px 48px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.fcc-submit-btn:hover {
    background: #d06318;
}

.fcc-submit-btn:active {
    transform: scale(0.97);
}

.fcc-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── reCAPTCHA notice ─────────────────────────────────────────── */
.fcc-recaptcha-note {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin: 0;
}

/* ── Lazy-load sentinel ───────────────────────────────────────── */
.fcc-sentinel {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}
.fcc-sentinel-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid #f0f0f0;
    border-top-color: #FF7300;
    border-radius: 50%;
    animation: fcc-spin .7s linear infinite;
}
.fcc-sentinel-spinner.active { display: block; }
@keyframes fcc-spin { to { transform: rotate(360deg); } }

/* ── Success Toast ────────────────────────────────────────────── */
.fcc-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1c7d31;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
    white-space: nowrap;
}

.fcc-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .fcc-title {
        font-size: 18px;
    }

    .fcc-search-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .fcc-search-btn {
        width: 100%;
        justify-content: center;
    }

    .fcc-field-row {
        flex-direction: column;
        gap: 0;
    }

    .fcc-field--half {
        margin-bottom: 18px;
    }

    .fcc-notify-card {
        padding: 24px 16px;
    }

    .fcc-results-table thead th,
    .fcc-results-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}
