/* ============================================
   Profile Form - Semantic Structure
   ============================================ */

/* Form Group - Container for label and input */
.profile-form-group {
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
    width: 100%;
    position: relative;
}

/* Form Label */
.profile-form-label {
    color: #1E1D33;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.profile-form-label .required-mark {
    color: #552D9A;
    font-weight: 700;
}

/* Form Inputs - Text, Email, Tel */
.profile-form-input,
.profile-form-input[type="text"] {
    width: 100%;
    background: #FDFDFD;
    border: 1px solid #CCCBEB;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
    color: #1E1D33;
    height: 46px;
    transition: all 200ms ease-in-out;
    font-family: inherit;
}

.profile-form-input::placeholder,
.profile-form-input[type="text"]::placeholder,
.profile-form-date-input[type="number"]::placeholder {
    color: #9593BD !important;
}

.profile-form-input:hover {
    border-color: #9593BD;
}

.profile-form-input:focus {
    outline: none;
    border-color: #552D9A;
}

/* Form Select */
.profile-form-select {
    width: 100%;
    background: #FDFDFD;
    border: 1px solid #CCCBEB;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 16px;
    color: #9593BD; /* Color gris para placeholder "Seleccionar" */
    height: 46px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0.699219 4.7002L4.69922 0.700195L8.69922 4.7002' stroke='%239593BD' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    transition: all 200ms ease-in-out;
    font-family: inherit;
}

.profile-form-select.has-value {
    color: #1E1D33 !important;
}

.profile-form-select:hover {
    border-color: #9593BD;
}

.profile-form-select:focus {
    outline: none;
    border-color: #552D9A;
}

.profile-form-select option {
    padding: 12px;
    color: #1E1D33;
    background: #FDFDFD;
}

.profile-form-select option:disabled {
    color: #9593BD;
}

/* Placeholder option styling */
.profile-form-select option[value=""] {
    color: #9593BD;
}

/* Error States */
.profile-form-group--error .profile-form-input,
.profile-form-group--error .profile-form-select {
    border-color: #E53935;
}

.profile-form-error-message {
    display: none;
    color: #E53935;
    font-size: 12px;
    margin-top: 4px;
}

.profile-form-group--error .profile-form-error-message {
    display: block;
}

/* Disabled States */
.profile-form-group--disabled .profile-form-label,
.profile-form-group--disabled .profile-form-input,
.profile-form-group--disabled .profile-form-select {
    color: #9593BD;
    cursor: not-allowed;
}

.profile-form-group--disabled .profile-form-input,
.profile-form-group--disabled .profile-form-select {
    background-color: #FAFAFA;
    border-color: #EBEBFE;
}

/* Date Input Group */
.profile-form-date-inputs {
    display: flex;
    gap: 0;
    border: 1px solid #CCCBEB;
    border-radius: 8px;
    overflow: hidden;
    background: #FDFDFD;
}

.profile-form-date-input,
.profile-form-date-input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 14px;
    text-align: center;
    font-size: 16px;
    color: #1E1D33;
    height: 46px;
    font-family: inherit;
    width: 88px;
    border-radius: 0;
}

.profile-form-date-input:focus {
    outline: none;
}

.profile-form-date-input::placeholder {
    color: #9593BD !important;
}

.profile-form-date-input:nth-child(2) {
    border-left: 1px solid #CCCBEB;
    border-right: 1px solid #CCCBEB;
}

.profile-form-group--error .profile-form-date-inputs {
    border-color: #E53935;
}

.profile-form-group--error .profile-form-date-input:nth-child(2) {
    border-left-color: #E53935;
    border-right-color: #E53935;
}

/* Document Number Input with DNI selector */
.profile-form-dni-container {
    display: flex;
    gap: 0;
}

.profile-form-dni-type {
    background: #FAFAFA;
    border: 1px solid #EBEBFE;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    color: #616083;
    font-size: 16px;
    height: 46px;
}

.profile-form-dni-input {
    border-radius: 0 8px 8px 0;
}

/* Phone Input with Country Code */
.profile-form-phone-container {
    display: flex;
    gap: 0;
}

.profile-form-country-code {
    background: #FAFAFA;
    border: 1px solid #EBEBFE;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 111px;
    color: #616083;
    font-size: 16px;
    height: 46px;
}

.profile-form-phone-input {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

/* ============================================
   intl-tel-input Integration for Profile Form
   ============================================ */

#profile-form .profile-form-group .iti {
    width: 100% !important;
}

#profile-form .profile-form-group .iti__flag-container {
    background: #FAFAFA !important;
    border: 1px solid #CCCBEB !important;
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
    height: 46px !important;
    padding: 0 8px 0 14px !important;
}

#profile-form .profile-form-group .iti__selected-flag {
    background: transparent !important;
    padding: 0 8px 0 4px !important;
    height: 100% !important;
}

#profile-form .profile-form-group .iti__flag {
    margin-right: 8px !important;
}

#profile-form .profile-form-group .iti__selected-dial-code {
    color: #616083 !important;
    font-size: 16px !important;
    margin-left: 4px !important;
    font-weight: 400 !important;
}

#profile-form .profile-form-group .iti__arrow {
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    border-top: 4px solid #9593BD !important;
    border-bottom: none !important;
    margin-left: 6px !important;
}

#profile-form .profile-form-group .iti__arrow--up {
    border-top: none !important;
    border-bottom: 4px solid #9593BD !important;
}

#profile-form .profile-form-group .iti--separate-dial-code .iti__selected-flag {
    background-color: transparent !important;
}

#profile-form .profile-form-group .iti__country-list {
    background: #FFFFFF !important;
    border: 1px solid #CCCBEB !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    max-height: 200px !important;
    margin-top: 2px !important;
}

#profile-form .profile-form-group .iti__country {
    padding: 8px 14px !important;
    color: #1E1D33 !important;
    background: transparent !important;
}

#profile-form .profile-form-group .iti__country:hover {
    background-color: #F5F4FF !important;
}

#profile-form .profile-form-group .iti__country.iti__highlight {
    background-color: #552D9A !important;
    color: #FFFFFF !important;
}

#profile-form .profile-form-group .iti__divider {
    border-bottom: 1px solid #EBEBFE !important;
}

#profile-form .profile-form-group .iti--separate-dial-code .iti__selected-flag {
    background-color: transparent !important;
}

/* Input dentro del intl-tel-input */
#profile-form .profile-form-group .iti__tel-input {
    background: #FDFDFD !important;
    border: 1px solid #CCCBEB !important;
    /* border-radius: 0 8px 8px 0 !important; */
    /* border-left: none !important; */
    height: 46px !important;
    /* padding: 12px 14px !important; */
    /* padding-left: 90px !important; */
    font-size: 16px !important;
    font-family: inherit !important;
    color: #1E1D33 !important;
}

#profile-form .profile-form-group .iti__tel-input::placeholder {
    color: #9593BD !important;
}

#profile-form .profile-form-group .iti__tel-input:focus {
    border-color: #552D9A !important;
    outline: none !important;
}

#profile-form .profile-form-group .iti__selected-country {
    height: 100% !important;
}

#profile-form .profile-form-group .iti--inline-dropdown .iti__dropdown-content {
    border-radius: 8px;
    border: 1px solid gray;
    margin-top: 0;
}

#profile-form .profile-form-group .iti__tel-input:hover {
    border-color: #9593BD !important;
}

/* Estado deshabilitado para intl-tel-input (usando clase de profile-form-group) */
#profile-form .profile-form-group--disabled .iti__flag-container {
    background: #F7F7F7 !important;
    border-color: #EBEBFE !important;
    pointer-events: none !important;
    opacity: 1 !important;
}

#profile-form .profile-form-group--disabled .iti__selected-dial-code {
    color: #9593BD !important;
}

#profile-form .profile-form-group--disabled .iti__tel-input {
    background: #F7F7F7 !important;
    color: #9593BD !important;
    cursor: not-allowed !important;
}

/* Estado deshabilitado usando el método setDisabled() de intl-tel-input */
#profile-form .profile-form-group .iti--disabled .iti__flag-container {
    background: #F7F7F7 !important;
    border-color: #EBEBFE !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

#profile-form .profile-form-group .iti--disabled .iti__selected-dial-code {
    color: #9593BD !important;
}

#profile-form .profile-form-group .iti--disabled .iti__tel-input {
    background: #F7F7F7 !important;
    color: #9593BD !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

#profile-form .profile-form-group .iti--disabled .iti__tel-input:hover {
    border-color: #EBEBFE !important;
}

/* Hover state solo cuando no está deshabilitado */
#profile-form .profile-form-group:not(.profile-form-group--disabled) .iti__flag-container:hover {
    border-color: #9593BD !important;
}

#profile-form .profile-form-group:not(.profile-form-group--disabled) .iti__tel-input:hover {
    border-color: #9593BD !important;
}

/* Estado de error */
#profile-form .profile-form-group--error .iti__flag-container {
    border-color: #D92D20 !important;
}

#profile-form .profile-form-group--error .iti__tel-input {
    border-color: #D92D20 !important;
}

/* Alert Messages */
.profile-form-alert {
    padding: 12px 16px;
    border-radius: 8px;
    gap: 8px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.profile-form-alert img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.profile-form-alert--danger {
    color: #D92D20;
    background: #FEE4E2;
}

.profile-form-alert--success {
    color: #6DAC51;
    background: #E9FFE0;
}

.profile-form-alert.hidden {
    display: none;
}

/* Edit Button for disabled fields */
.profile-form-edit-btn {
    position: absolute;
    width: 40px;
    height: 38px;
    top: 27px;
    right: 3px;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: none;
    padding: 0;
}

input.profile-form-input {
    font-size: 16px;
}

/* ============================================
   Uploaded Files Section
   ============================================ */

/* Alert Info - Blue/Info styling */
.alert-cod-info {
    background: #EDF1FD;
    border-radius: 8px;
    padding: 13px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.alert-cod-info img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* .alert-cod-info b {
    color: #0369A1;
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
} */

.alert-cod-info span {
    color: #4168D8;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

/* Uploaded Files List */
.cod-uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

/* Uploaded File Item */
.cod-uploaded-file-item {
    background: #FDFDFD;
    border: 1px solid #CCCBEB;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 200ms ease-in-out;
}

.cod-uploaded-file-item:hover {
    border-color: #9593BD;
    background: #FAFAFA;
}

/* Uploaded File Info */
.cod-uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cod-uploaded-file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cod-uploaded-file-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cod-uploaded-file-name {
    color: #1E1D33;
    font-size: 16px;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* View Button */
.cod-uploaded-file-view {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 200ms ease-in-out;
    flex-shrink: 0;
}

.cod-uploaded-file-view:hover {
    background: #F5F4FF;
}

.cod-uploaded-file-view img {
    width: 20px;
    height: 20px;
}

/* Hidden state */
.cod-uploaded-file-item.hidden {
    display: none;
}