/* Clean validation state styles with improved visual feedback */
.input-valid {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
    background-color: #f0fdf4;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
    background-color: #fef2f2;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-valid:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
    background-color: #ffffff;
}

.input-invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
    background-color: #ffffff;
}

/* Subtle animation for validation state changes */
.input-valid,
.input-invalid {
    animation: validation-pulse 0.3s ease-out;
}

@keyframes validation-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .input-valid,
    .input-invalid,
    .validation-message {
        animation: none !important;
        transition: none !important;
    }
}

/* Modern form input styling with Gothic/Powder Ash palette */
input[type="email"],
input[type="url"] {
    font-weight: 400;
    border: 2px solid var(--gothic-200);
    background-color: rgba(248, 250, 252, 0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    color: var(--gothic-700);
}

input[type="email"]:focus,
input[type="url"]:focus {
    border-color: var(--gothic-500);
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    outline: none;
}

input[type="email"]:hover,
input[type="url"]:hover {
    border-color: var(--gothic-300);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    background-color: var(--gothic-50);
}

/* Placeholder styling */
input[type="email"]::placeholder,
input[type="url"]::placeholder {
    color: var(--gothic-400);
    font-weight: 400;
}

/* Form container for proper text containment */
.form-container {
    width: 100%;
    overflow: hidden;
}

/* Input group styling with enhanced spacing */
.input-group {
    width: 100%;
    overflow: hidden;
}

/* Smooth transitions for validation feedback */
.validation-message {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 0.25rem;
}

/* Improved validation message visibility */
.validation-message:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    max-height: 3rem;
}

.validation-message.hidden {
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
}

/* Enhanced hover effects for desktop */
@media (hover: hover) and (pointer: fine) {
    /* Desktop hover states */
    input[type="email"]:hover,
    input[type="url"]:hover {
        border-color: #94a3b8;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
    }

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .hover-lift:hover {
        transform: none;
    }

    /* Enhanced touch feedback */
    .btn-primary:active:not(:disabled) {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    input[type="email"]:focus,
    input[type="url"]:focus {
        transform: none;
    }
}