/* ================================
TEXT UNDERLINES
================================ */
.underline,
.underlinelight {
position: relative;
display: inline;
}

.underline::after,
.underlinelight::after {
content: '';
position: absolute;
left: 0;
width: 100%;
bottom: 0;
background: var(--grad-color, currentColor);
}

.underline::after { height: 2px; }
.underlinelight::after { height: 1px; }

/* ================================
SLIDER PAGINATION LIMIT
================================ */

/* Desktop: show max 3 */
.splide__pagination li:nth-child(n+4),
.swiper-pagination-bullet:nth-child(n+4) {
display: none !important;
opacity: 0 !important;
visibility: hidden !important;
}

/* Mobile: show max 2 */
@media (max-width: 767px) {
.splide__pagination li:nth-child(n+3),
.swiper-pagination-bullet:nth-child(n+3) {
display: none !important;
opacity: 0 !important;
visibility: hidden !important;
}
}

/* Center pagination */
.splide__pagination,
.swiper-pagination {
display: flex !important;
justify-content: center !important;
gap: 8px;
}

/* ================================
EDITOR CLEANUP
================================ */
#bricks-editor .element:focus,
#bricks-editor .element:focus-within {
outline: none !important;
}

/* ================================
GRID CONTEXT
================================ */
.process-grid {
position: relative;
isolation: isolate;
}

/* ================================
TAB BUTTONS
================================ */
.tab-button {
cursor: pointer;
transition: all 0.3s ease;
opacity: 0.6;
border: 2px solid transparent;
}

.tab-button:hover {
opacity: 0.9;
transform: translateY(-2px);
}

.tab-button.active {
opacity: 1 !important;
background-color: #E3F4F6 !important;
box-shadow: 0 0 0 2px #5EB1BF !important;
color: #0e3f4a !important;
}

/* ================================
RADIO & CHECKBOX STATES
================================ */
input[type="radio"]:checked + div,
input[type="radio"]:checked + label,
.bf-radio-button input:checked + .bf-radio-content,
input[type="checkbox"]:checked + div,
input[type="checkbox"]:checked + label {
box-shadow: 0 0 0 2px #5EB1BF !important;
}

/* ================================
INPUT FOCUS + SAFARI FIXES
================================ */
input,
textarea,
select {
color: inherit;
-webkit-text-fill-color: currentColor;
}

input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #5EB1BF !important;
box-shadow: 0 0 0 3px rgba(94, 177, 191, 0.2);
}

/* iOS Safari autofill fix */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-text-fill-color: currentColor !important;
transition: background-color 9999s ease-in-out 0s;
}

/* ================================
FORM SUBMIT BUTTON FIX ONLY
================================ */
.brxe-form input[type="submit"],
.brxe-form button[type="submit"] {
-webkit-appearance: none;
appearance: none;

color: inherit;
-webkit-text-fill-color: currentColor;
}

/* Ensure inner elements behave */
.brxe-form button[type="submit"] * {
color: inherit;
-webkit-text-fill-color: currentColor;
}

/* SVG inside submit button */
.brxe-form button[type="submit"] svg {
fill: currentColor;
}

/* ================================
FORM LABEL STRUCTURE
================================ */
.bf-custom-label {
display: flex;
flex-direction: column;
line-height: 1.3;
}

.bf-label-title {
font-size: var(--aptext-m);
font-weight: 400;
}

.bf-label-subtitle {
font-size: var(--aptext-xs);
opacity: 0.8;
margin-top: 0;
}

/* ================================
REMOVE UNWANTED FIELD STATES
================================ */
label[for*="form-field-timing"],
label[for*="form-field-services"] {
border: none !important;
outline: none !important;
box-shadow: none !important;
}

input[id*="form-field-timing"]:checked + label,
input[id*="form-field-services"]:checked + label,
input[id*="form-field-timing"]:focus + label,
input[id*="form-field-services"]:focus + label {
border: none !important;
outline: none !important;
box-shadow: none !important;
}

/* ================================
GRADIENT TEXT (STRICTLY SCOPED)
================================ */
[data-highlight].has-gradient-highlight {
-webkit-background-clip: initial !important;
background-clip: initial !important;
}

[data-highlight].has-gradient-highlight span {
-webkit-background-clip: text !important;
background-clip: text !important;
-webkit-text-fill-color: transparent !important;
background-image: inherit;
}

/* ================================
SVG RENDERING FIX (CRITICAL)
================================ */
.bricks-site-logo {
transform: none !important;
will-change: auto;
}

.bricks-site-logo svg {
shape-rendering: geometricPrecision;
}

/* Prevent gradient interference */
svg * {
-webkit-text-fill-color: initial !important;
}

/* ================================
UNDERLINE SAFETY FIX
================================ */
span[style*="text-decoration: underline"] {
-webkit-text-fill-color: initial !important;
color: inherit !important;
}
