/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --ing-orange: #ff6200;
    --ing-orange-dark: #e55a00;
    --ing-orange-light: #ff8533;
    --ing-blue: #003d82;
    --ing-grey: #767676;
    --ing-grey-light: #d9d9d9;
    --ing-grey-dark: #333333;
    --ing-white: #ffffff;
}

/* Global Styles */
html {
    font-size: 16px;
}

body {
    font-family: "Roboto", arial, sans-serif !important;
    background-color: #f0f0f0;
    background-image: url('../assets/svg/fcc1889b9ff054ccc3edbca148a17426.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--ing-grey-dark);
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto", arial, sans-serif !important;
    font-weight: normal;
    line-height: 1.2;
    margin: 0;
}

h1 {
    font-size: 1.5em;
    line-height: 1.333em;
    margin-bottom: 1.5em;
}

h2 {
    font-size: 1.25em;
    line-height: 1.4em;
}

h3 {
    font-size: 1.125em;
    line-height: 1.444em;
}

h4 {
    font-size: 1em;
    line-height: 1.5em;
}

h5 {
    font-size: 0.875em;
    line-height: 1.571em;
}

h6 {
    font-size: 0.75em;
    line-height: 1.667em;
}

/* Header */
.page-header {
    background-color: var(--ing-white);
    border-bottom: solid 1px var(--ing-grey-light);
    padding: 0 5.125em;
    height: 4.25em;
    position: relative;
    z-index: 10;
    vertical-align: middle;
}

.header-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    height: 100%;
}

.header-logo {
    float: left;
    height: 4.25em;
    width: 5.25em;
    box-sizing: border-box;
}

.ing-logo-img {
    width: 100%;
    height: 100%;
    display: block;
    background: url('../assets/svg/ing-logo.svg') no-repeat center center;
    background-size: 100%;
}

/* Desktop: ensure logo uses full container size */
@media (min-width: 769px) {
    .ing-logo-img {
        width: 100% !important;
        height: 100% !important;
        background-size: 100% !important;
        background-position: center center !important;
    }
}

.header-phone {
    float: right;
    padding: 1.4em 0;
}

.header-inline-block {
    vertical-align: middle;
    display: inline-block;
}

.phoneNumberIcon {
    color: var(--ing-orange);
    width: 1.125em;
    height: 1.125em;
    line-height: 1;
    font-size: 1.125em;
    padding-right: 0.75em;
    display: inline-block;
    vertical-align: middle;
}

.phone-icon {
    width: 1.125em;
    height: 1.125em;
    color: var(--ing-orange);
}

.phone-number {
    font-size: 0.875em;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.43;
    letter-spacing: normal;
    color: #333333;
}

/* Login Container */
.login-container {
    position: relative;
    min-height: calc(100vh - 80px);
    display: block;
    padding: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    position: relative;
    margin-top: 48px;
    margin-bottom: 42px;
    transform: translate(-50%, 0);
    left: 50%;
}

.login-box {
    background-color: var(--ing-white);
    border-radius: 8px;
    padding: 48px 48px;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.14);
    width: 100%;
}

.login-title {
    font-size: 1.5em;
    line-height: 1.333em;
    color: var(--ing-grey-dark);
    margin-bottom: 1em;
    text-align: left;
}

/* Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5em;
}

.form-label {
    display: block;
    font-size: 16px;
    color: var(--ing-grey-dark);
    margin-bottom: 0.75em;
    font-weight: normal;
    font-family: "Roboto", arial, sans-serif !important;
    text-shadow: 0 0.125em 0.125em rgba(217, 217, 217, 0.3);
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 2em;
}

.radio-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom {
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--ing-grey-light);
    border-radius: 50%;
    background-color: var(--ing-white);
    transition: all 0.2s;
    box-shadow: inset 0 0.125em 0.125em 0 #d9d9d9;
}

.radio-input:checked ~ .radio-custom {
    border-color: var(--ing-orange);
    background-color: var(--ing-white);
    box-shadow: inset 0 0.125em 0.125em 0 #d9d9d9;
}

.radio-input:checked ~ .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--ing-orange);
}

.radio-text {
    font-size: 14px;
    color: #333333;
    line-height: 1.5;
    font-weight: normal;
}

/* Input Fields */
.form-input {
    width: 100%;
    padding: 0.75em 1em;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ing-grey-dark);
    background-color: var(--ing-white);
    border: 1px solid var(--ing-grey-light);
    border-radius: 0.25em;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: "Roboto", arial, sans-serif !important;
}

.form-input:focus {
    outline: none;
    border-color: var(--ing-orange);
    box-shadow: 0 0 0 3px rgba(255, 98, 0, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder {
    color: #999;
    text-align: left;
    font-size: 16px;
}

/* Date Input */
.date-input-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid #d9d9d9;
    border-radius: 0.25em;
    background-color: var(--ing-white);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0;
    overflow: hidden;
    position: relative;
    min-height: 2.5em;
}

.date-input-segment {
    flex: 1;
    padding: 0.75em 1em;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ing-grey-dark);
    background-color: transparent;
    border: none;
    text-align: left;
    font-family: "Roboto", arial, sans-serif !important;
    min-width: 0;
    box-shadow: none;
}

.date-input-segment:focus {
    outline: none;
}

.date-input-segment::placeholder {
    color: #999;
    text-align: left;
    font-size: 16px;
}

.date-divider {
    width: 1px;
    height: auto;
    background-color: #d9d9d9;
    flex-shrink: 0;
    align-self: stretch;
    margin: 0.5em 0;
}

.date-input-wrapper:focus-within {
    border-color: var(--ing-orange);
    box-shadow: 0 0 0 3px rgba(255, 98, 0, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 2em;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    position: absolute;
    left: 0;
    width: 1.25em;
    height: 1.25em;
    border: 0.0625em solid #a8a8a8;
    border-radius: 0.25em;
    background-color: var(--ing-white);
    transition: all 0.2s;
    box-shadow: inset 0 0.125em 0.125em 0 #d9d9d9;
}

.checkbox-input:checked ~ .checkbox-custom {
    background-color: var(--ing-orange);
    border-color: var(--ing-orange);
    box-shadow: inset 0 0.125em 0.125em 0 #d9d9d9;
}

.checkbox-input:checked ~ .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--ing-white);
    font-size: 0.9375em;
    font-weight: bold;
    line-height: 1;
}

.checkbox-text {
    font-size: 16px;
    color: var(--ing-grey-dark);
    line-height: 1.5;
    font-family: "Roboto", arial, sans-serif !important;
}

/* Help Icon */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    color: #ff6200;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    line-height: 1;
    flex-shrink: 0;
    border: 1px solid #ff6200;
}

/* Login Button */
.c-btn {
    font-size: 1.1875em;
    line-height: 1.474em;
    border-radius: 0.5em;
    transition: background-color 0.1s linear;
}

.login-button {
    width: 100% !important;
    max-width: 100%;
    padding: 0.3em 1.5em;
    font-size: 1.1875em;
    line-height: 1.25;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(to bottom, #FF6200 0%, #FF6200 100%);
    border: 2px solid #FF6200;
    border-radius: 0.5em;
    cursor: pointer;
    transition: background-color 0.1s linear, color 0.1s linear, border-color 0.1s linear, background 0.1s linear;
    margin-top: 0;
    margin-bottom: 0.75em;
    text-transform: none;
    letter-spacing: normal;
    box-sizing: border-box;
    font-family: "Roboto", arial, sans-serif !important;
}

.c-btn--expand {
    width: 100%;
}

.login-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-button:hover,
.login-button[inverted]:hover {
    background: #ffffff;
    color: #767676;
    border: 2px solid #FF6200;
}

/* Security Link */
.security-link-container {
    text-align: left;
    margin-top: 0.75em;
}

.security-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: #333333;
    text-decoration: underline;
    font-size: 1em;
    line-height: 1.5;
    transition: color 0.2s;
    font-family: "Roboto", arial, sans-serif !important;
}

.security-link:hover {
    color: #333333;
}

.arrow-icon {
    flex-shrink: 0;
    display: inline-block;
    width: 16px;
    height: 16px;
}

.arrow-icon path {
    stroke: #ff6200;
    stroke-width: 1.5;
}

/* reCAPTCHA Badge */
.grecaptcha-badge {
    position: fixed;
    bottom: 14px;
    right: -186px;
    width: 256px;
    height: 60px;
    display: block;
    transition: right 0.3s;
    box-shadow: gray 0px 0px 5px;
    border-radius: 2px;
    overflow: hidden;
    z-index: 1000;
}

.grecaptcha-logo {
    width: 100%;
    height: 100%;
}

.grecaptcha-logo iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Utility Classes */
.u-padding-0 { padding: 0 !important; }
.u-padding-1 { padding: 0.5em !important; }
.u-padding-2 { padding: 1em !important; }
.u-padding-3 { padding: 1.5em !important; }

.u-margin-0 { margin: 0 !important; }
.u-margin-1 { margin: 0.5em !important; }
.u-margin-2 { margin: 1em !important; }
.u-margin-3 { margin: 1.5em !important; }

.u-hidden-visually {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Error Messages */
.form-input.error,
.date-input-wrapper.error {
    border-color: #d32f2f;
}

.error-message {
    display: block;
    color: #d32f2f;
    font-size: 0.875em;
    margin-top: 0.25em;
    line-height: 1.4;
}

.date-input-wrapper.error {
    border-color: #d32f2f;
}

/* Responsive */
@media (max-width: 678px) {
    .header-logo {
        float: none;
        margin: 0 !important;
        margin-left: 0 !important;
        display: block;
    }
    
    .header-phone .header-inline-block {
        display: inline-block !important;
    }
    
    .page-header {
        padding: 0 1em;
    }
    
    .ing-logo-img {
        background-image: url('../assets/svg/ing-logo.svg') !important;
        background-size: 84px 28px !important;
        background-position: 0 center !important;
        width: 84px !important;
        height: 28px !important;
        display: block !important;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 2em 1.5em;
    }
    
    .header-logo {
        height: 28px !important;
        width: 84px !important;
        margin: 0 !important;
        margin-left: 0 !important;
    }
    
    .ing-logo-img {
        background-image: url('../assets/svg/ing-logo.svg') !important;
        background-size: 84px 28px !important;
        background-position: 0 center !important;
        background-repeat: no-repeat !important;
        width: 84px !important;
        height: 28px !important;
        min-width: 84px !important;
        min-height: 28px !important;
        max-width: 84px !important;
        max-height: 28px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .page-header {
        display: flex !important;
        align-items: center !important;
    }
    
    .header-content {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
}

/* Additional styles for ig folder pages */
.contenido_sin_frame {
    padding: 20px;
    max-width: 100%;
}

.login-new {
    max-width: 100%;
}

.pie {
    background-color: var(--ing-white);
    padding: 1em;
    text-align: center;
    font-size: 0.875em;
    color: var(--ing-grey);
    border-top: 1px solid var(--ing-grey-light);
}

.superior5 {
    margin-top: 0.5em;
}

/* Button styles for ig pages */
.btn-submit {
    width: 100%;
    padding: 0.3em 1.5em;
    font-size: 1.1875em;
    line-height: 1.25;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(to bottom, #FF6200 0%, #FF6200 100%);
    border: 2px solid #FF6200;
    border-radius: 0.5em;
    cursor: pointer;
    transition: background-color 0.1s linear, color 0.1s linear, border-color 0.1s linear, background 0.1s linear;
    margin-top: 0;
    margin-bottom: 0.75em;
    text-transform: none;
    letter-spacing: normal;
    box-sizing: border-box;
    font-family: "Roboto", arial, sans-serif !important;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-submit:hover {
    background: #ffffff;
    color: #767676;
    border: 2px solid #FF6200;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form input styles for ig pages */
.usuario.prel input {
    width: 100%;
    padding: 0.75em 1em;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ing-grey-dark);
    background-color: var(--ing-white);
    border: 1px solid var(--ing-grey-light);
    border-radius: 0.25em;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: "Roboto", arial, sans-serif !important;
}

.usuario.prel input:focus {
    outline: none;
    border-color: var(--ing-orange);
    box-shadow: 0 0 0 3px rgba(255, 98, 0, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.usuario.prel label {
    display: block;
    font-size: 16px;
    color: var(--ing-grey-dark);
    margin-bottom: 0.5em;
    font-weight: normal;
    font-family: "Roboto", arial, sans-serif !important;
}

/* Progress stepper for ig pages */
.progress-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 40px;
    margin: 40px 0;
}

.progress-line {
    position: absolute;
    top: 15px;
    left: 80px;
    right: 80px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #999;
    margin-bottom: 10px;
    font-size: 14px;
}

.step.active .step-circle,
.step.completed .step-circle {
    background: #FF6200;
    border-color: #FF6200;
    color: white;
}

.step-label {
    text-align: center;
    font-size: 13px;
    color: #666;
    font-weight: normal;
    font-family: "Roboto", arial, sans-serif !important;
}

.step.active .step-label {
    color: #FF6200;
    font-weight: 600;
}

/* Loading spinner */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e5e5e5;
    border-top: 6px solid #FF6200;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #FF6200;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: "Roboto", arial, sans-serif !important;
}

.loading-subtext {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    max-width: 500px;
    margin: 0 auto;
    font-family: "Roboto", arial, sans-serif !important;
}

.timer {
    font-size: 16px;
    color: #999;
    margin-top: 20px;
    font-family: "Roboto", arial, sans-serif !important;
}

/* Error messages */
#errorMessage {
    color: #d32f2f;
    font-size: 0.875em;
    margin-top: 0.5em;
    line-height: 1.4;
    font-family: "Roboto", arial, sans-serif !important;
    display: none;
}

#errorMessage.show {
    display: block;
}

/* Button container */
.button-container {
    width: 100%;
    margin-top: 20px;
}

/* Loading container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 20px;
}
