.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}
.form-control.is-invalid {
    background-image: none !important;
    padding-right: 35px; /* Make room for the icon */
}
.error-icon {
    position: absolute;
    right: 7px;
    bottom: 0px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc3545;
    font-size: 14px;
    background: #fff;
    border-radius: 50%;
    border: 1.5px solid #dc3545;
    transition: all 0.2s ease;
}
.error-icon:hover {
    background: #dc3545;
    color: #fff;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.25);
}
.error-icon:after {
    content: "!";
    font-weight: bold;
    font-family: Arial, sans-serif;
    line-height: 1;
}
.tooltip-error {
    position: absolute;
    bottom: 0px;
    right: 0;
    transform: translateY(-100%);
    background: #dc3545;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-line;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    min-width: 150px;
    max-width: 250px;
    text-align: left;
}
.error-icon:hover + .tooltip-error,
.error-icon:focus + .tooltip-error {
    opacity: 1;
    visibility: visible;
    transform: translateY(-100%) translateY(-4px);
}
.tooltip-error::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: #dc3545 transparent transparent transparent;
}
