/**
 * Elementor Compatibility
 * Prevents Elementor and other page builders from overriding plugin styles
 */

/* Strong wrapper isolation - Override Elementor */
.utleiekalk-finn-wrapper {
    all: initial;
    display: block !important;
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: var(--uk-text, #1b1f23) !important;
    box-sizing: border-box !important;
}

.utleiekalk-finn-wrapper *,
.utleiekalk-finn-wrapper *::before,
.utleiekalk-finn-wrapper *::after {
    box-sizing: border-box !important;
}

/* Force reset Elementor font inheritance with higher specificity */
body .utleiekalk-finn-wrapper,
body .utleiekalk-finn-wrapper *,
body .utleiekalk-finn-wrapper .uk-label,
body .utleiekalk-finn-wrapper .uk-btn,
body .utleiekalk-finn-wrapper .uk-step-title,
body .utleiekalk-finn-wrapper .metric-title {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

/* Forms should use Inter */
body .utleiekalk-finn-wrapper input,
body .utleiekalk-finn-wrapper select,
body .utleiekalk-finn-wrapper textarea,
body .utleiekalk-finn-wrapper .uk-input {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

/* Ensure forms use correct font */
.utleiekalk-finn-wrapper .uk-input,
.utleiekalk-finn-wrapper .uk-label,
.utleiekalk-finn-wrapper .uk-btn,
.utleiekalk-finn-wrapper input,
.utleiekalk-finn-wrapper select,
.utleiekalk-finn-wrapper textarea,
.utleiekalk-finn-wrapper button {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

/* Protect font weights */
.utleiekalk-finn-wrapper .uk-step-title {
    font-weight: 800 !important;
}

.utleiekalk-finn-wrapper .uk-btn {
    font-weight: 600 !important;
}

.utleiekalk-finn-wrapper .seg-btn {
    font-weight: 800 !important;
}

.utleiekalk-finn-wrapper .uk-label {
    font-weight: 700 !important;
}

.utleiekalk-finn-wrapper .metric-title {
    font-weight: 700 !important;
}

.utleiekalk-finn-wrapper .metric-value {
    font-weight: 800 !important;
}

/* Protect slider styles */
.utleiekalk-finn-wrapper input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 8px !important;
    border-radius: 4px !important;
    outline: none !important;
    margin: 12px 0 !important;
    /* Background is set dynamically by JavaScript */
}

.utleiekalk-finn-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #09B87D !important;
    cursor: pointer !important;
    border: 3px solid white !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

.utleiekalk-finn-wrapper input[type="range"]::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #09B87D !important;
    cursor: pointer !important;
    border: 3px solid white !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

/* Protect button styles */
.utleiekalk-finn-wrapper .uk-btn {
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 10px 18px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    line-height: 1.4 !important;
}

/* Protect input styles */
.utleiekalk-finn-wrapper .uk-input {
    display: block !important;
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid var(--uk-border, #E6E8EC) !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

/* Protect card styles */
.utleiekalk-finn-wrapper .uk-card {
    background: var(--uk-card, #ffffff) !important;
    border: 1px solid var(--uk-border, #E6E8EC) !important;
    border-radius: 16px !important;
    padding: var(--uk-pad, 22px) !important;
    box-shadow: var(--uk-shadow, 0 6px 20px rgba(16,24,40,.06)) !important;
}

/* Reset any Elementor spacing that might affect layout */
.utleiekalk-finn-wrapper .uk-grid {
    margin: 0 !important;
    padding: 0 !important;
}

/* Protect spacing */
.utleiekalk-finn-wrapper .uk-gap {
    gap: var(--uk-gap, 22px) !important;
}

/* Ensure proper text rendering */
.utleiekalk-finn-wrapper {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* ================================================
   EKSTRA AGGRESSIVE ELEMENTOR OVERRIDES
   ================================================ */

/* Target Elementor widget containers */
.elementor-widget-container .utleiekalk-finn-wrapper,
.elementor-widget-container .utleiekalk-finn-wrapper *,
.elementor-element .utleiekalk-finn-wrapper,
.elementor-element .utleiekalk-finn-wrapper *,
div[class*="elementor"] .utleiekalk-finn-wrapper,
div[class*="elementor"] .utleiekalk-finn-wrapper * {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

/* Target Elementor widget containers - inputs */
.elementor-widget-container .utleiekalk-finn-wrapper input,
.elementor-widget-container .utleiekalk-finn-wrapper select,
.elementor-widget-container .utleiekalk-finn-wrapper textarea,
.elementor-widget-container .utleiekalk-finn-wrapper .uk-input,
.elementor-element .utleiekalk-finn-wrapper input,
.elementor-element .utleiekalk-finn-wrapper select,
.elementor-element .utleiekalk-finn-wrapper textarea,
.elementor-element .utleiekalk-finn-wrapper .uk-input,
div[class*="elementor"] .utleiekalk-finn-wrapper input,
div[class*="elementor"] .utleiekalk-finn-wrapper select,
div[class*="elementor"] .utleiekalk-finn-wrapper textarea,
div[class*="elementor"] .utleiekalk-finn-wrapper .uk-input {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

/* Maximum specificity - nuclear option */
html body .elementor-widget-container .utleiekalk-finn-wrapper,
html body .elementor-widget-container .utleiekalk-finn-wrapper *,
html body .elementor-element .utleiekalk-finn-wrapper,
html body .elementor-element .utleiekalk-finn-wrapper * {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

html body .elementor-widget-container .utleiekalk-finn-wrapper input,
html body .elementor-widget-container .utleiekalk-finn-wrapper select,
html body .elementor-widget-container .utleiekalk-finn-wrapper textarea,
html body .elementor-widget-container .utleiekalk-finn-wrapper .uk-input,
html body .elementor-element .utleiekalk-finn-wrapper input,
html body .elementor-element .utleiekalk-finn-wrapper select,
html body .elementor-element .utleiekalk-finn-wrapper textarea,
html body .elementor-element .utleiekalk-finn-wrapper .uk-input {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

/* Override any inherited font-family from parent elements */
* .utleiekalk-finn-wrapper,
* .utleiekalk-finn-wrapper * {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

* .utleiekalk-finn-wrapper input,
* .utleiekalk-finn-wrapper select,
* .utleiekalk-finn-wrapper textarea,
* .utleiekalk-finn-wrapper .uk-input {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
}

/* ================================================
   FIX SPECIFIC BUTTONS - LAGREDE KALKULASJONER
   ================================================ */

/* Force dark text on cases-toggle button */
.utleiekalk-finn-wrapper .cases-toggle,
body .utleiekalk-finn-wrapper .cases-toggle,
.elementor-widget-container .utleiekalk-finn-wrapper .cases-toggle,
.elementor-element .utleiekalk-finn-wrapper .cases-toggle,
html body .elementor-widget-container .utleiekalk-finn-wrapper .cases-toggle,
html body .elementor-element .utleiekalk-finn-wrapper .cases-toggle,
* .utleiekalk-finn-wrapper .cases-toggle {
    color: #0b1220 !important;
    background: #fff !important;
    border: 1px solid var(--uk-border, #E6E8EC) !important;
}

/* Force dark text on cases-toggle button hover */
.utleiekalk-finn-wrapper .cases-toggle:hover,
body .utleiekalk-finn-wrapper .cases-toggle:hover,
.elementor-widget-container .utleiekalk-finn-wrapper .cases-toggle:hover,
.elementor-element .utleiekalk-finn-wrapper .cases-toggle:hover {
    color: #0b1220 !important;
    background: #f9fafb !important;
    border-color: var(--uk-primary, #09B87D) !important;
}

/* Force color on the text inside cases-toggle */
.utleiekalk-finn-wrapper .cases-toggle span,
body .utleiekalk-finn-wrapper .cases-toggle span,
.elementor-widget-container .utleiekalk-finn-wrapper .cases-toggle span,
.elementor-element .utleiekalk-finn-wrapper .cases-toggle span,
html body .elementor-widget-container .utleiekalk-finn-wrapper .cases-toggle span,
html body .elementor-element .utleiekalk-finn-wrapper .cases-toggle span {
    color: #0b1220 !important;
}
