.custom-validation {
    position: relative;
    max-width: 300px;
}

.custom-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.custom-input:invalid {
    border-color: #e74c3c;
}

.custom-input:valid {
    border-color: #27ae60;
}

.custom-validation::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

.custom-validation:has(.custom-input:valid)::after {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-validation:has(.custom-input:invalid:not(:placeholder-shown))::after {
    content: '✗';
    color: #e74c3c;
    font-weight: bold;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
}