/* Contact Form 7 phone fields — country code picker (cf7-phone-country.js).
   !important is used where the theme's global button/input/list styles
   would otherwise win. */

/* ── Button inside the field ──────────────────────────────────────────── */

.gcs-phone {
    position: relative;
    display: block;
}

/* The theme transitions "all" on inputs, so the script widening the left
   padding made the placeholder slide in. Keep only the focus colour fade. */
.gcs-phone > input[type="tel"] {
    transition-property: border-color, background-color, color, box-shadow !important;
}

.gcs-phone > .gcs-phone__toggle {
    position: absolute;
    z-index: 2;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 12px 0 20px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1 !important;
    text-transform: none !important;
    white-space: nowrap;
    cursor: pointer;
    transform: none !important;
    /* The theme's button transition would animate the copied font weight,
       shrinking the button — and sliding the placeholder — over 0.3s. */
    transition: none !important;
}

.gcs-phone > .gcs-phone__toggle::before {
    content: none !important;
}

/* Divider between the code and the number: the field's own border colour
   when it has one (set by the script), otherwise a faint text-colour line. */
.gcs-phone > .gcs-phone__toggle::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: currentColor;
    opacity: .25;
}

.gcs-phone > .gcs-phone__toggle[style*="--gcs-phone-divider"]::after {
    background: var(--gcs-phone-divider);
    opacity: 1;
}

.gcs-phone > .gcs-phone__toggle:focus {
    outline: none;
}

.gcs-phone > .gcs-phone__toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -6px;
}

.gcs-phone__caret {
    width: 0;
    height: 0;
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-top: 5px solid currentColor;
    opacity: .7;
    transition: transform .15s ease;
}

.gcs-phone.is-open .gcs-phone__caret {
    transform: rotate(180deg);
}

/* ── Country list panel (appended to <body>) ──────────────────────────── */

.gcs-phone-panel {
    --gcs-pp-bg: #fff;
    --gcs-pp-text: #111827;
    --gcs-pp-muted: #6b7280;
    --gcs-pp-line: #e5e7eb;
    --gcs-pp-hover: #f3f4f6;

    position: fixed;
    z-index: 100000;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--gcs-pp-bg);
    color: var(--gcs-pp-text);
    border: 1px solid var(--gcs-pp-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, .12), 0 2px 6px rgba(17, 24, 39, .06);
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
}

.gcs-phone-panel[hidden] {
    display: none !important;
}

.gcs-phone-panel__search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--gcs-pp-line);
}

.gcs-phone-panel__search svg {
    flex: none;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--gcs-pp-muted);
    stroke-width: 2;
    stroke-linecap: round;
}

.gcs-phone-panel .gcs-phone-panel__search input {
    flex: 1;
    min-width: 0;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--gcs-pp-text) !important;
    font: inherit;
    font-size: 16px !important; /* 16px stops iOS zooming in on focus */
    line-height: 1.4 !important;
}

.gcs-phone-panel .gcs-phone-panel__search input::placeholder {
    color: var(--gcs-pp-muted);
    opacity: 1;
}

.gcs-phone-panel .gcs-phone-panel__list {
    position: relative;
    max-height: 280px;
    margin: 0 !important;
    padding: 6px 0 !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none !important;
}

.gcs-phone-panel .gcs-phone-panel__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 !important;
    padding: 10px 18px !important;
    list-style: none !important;
    cursor: pointer;
}

.gcs-phone-panel .gcs-phone-panel__list li::before,
.gcs-phone-panel .gcs-phone-panel__list li::after {
    content: none !important;
}

.gcs-phone-panel .gcs-phone-panel__list li[hidden] {
    display: none !important;
}

.gcs-phone-panel .gcs-phone-panel__list li:hover,
.gcs-phone-panel .gcs-phone-panel__list li.is-active {
    background: var(--gcs-pp-hover);
}

.gcs-phone-panel .gcs-phone-panel__list li[aria-selected="true"] {
    font-weight: 600;
}

.gcs-phone-panel__code {
    flex: none;
    color: var(--gcs-pp-muted);
    font-variant-numeric: tabular-nums;
}

.gcs-phone-panel__empty {
    margin: 0 !important;
    padding: 14px 18px;
    color: var(--gcs-pp-muted);
}
