/* Modern Form Styling */

.form {
    display: grid;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(139, 92, 246, 0.05) 50%, 
        rgba(236, 72, 153, 0.05) 100%);
    animation: shimmer 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* Input and Textarea Styling */
.form input,
.form textarea,
.form select {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    padding: 1rem 1.25rem;
    color: rgba(226, 232, 240, 0.9);
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.form input::placeholder,
.form textarea::placeholder {
    color: rgba(226, 232, 240, 0.5);
    font-weight: 400;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* File Input Styling */
.form input[type="file"] {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form input[type="file"]:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.form input[type="file"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Button Styling */
.form button {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    place-self: end;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.form button:hover::before {
    left: 100%;
}

.form button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

.form button:active {
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* Select Dropdown Styling */
.form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 3rem;
}

.form select option {
    background: rgba(15, 23, 42, 0.95);
    color: rgba(226, 232, 240, 0.9);
    padding: 0.5rem;
}

/* Form Labels */
.form label {
    color: rgba(226, 232, 240, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
    z-index: 1;
    position: relative;
}

/* Form Group Styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1;
    position: relative;
}

/* Amount Input Special Styling */
#amount {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 25px;
    padding: 1rem 1.5rem;
    width: fit-content;
    text-align: center;
    font-weight: 700;
    color: #22c55e;
}

#amount:focus {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

/* Close Button Styling */
.close ion-icon {
    background: transparent;
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    padding: 0.75rem;
    color: azure;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.close ion-icon:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.6);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.4);
}

/* Form Validation States */
.form input:invalid,
.form textarea:invalid,
.form select:invalid {
    border-color: rgba(239, 68, 68, 0.5);
}

.form input:valid,
.form textarea:valid,
.form select:valid {
    border-color: rgba(34, 197, 94, 0.5);
}

/* Loading State */
.form button:disabled {
    background: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
    transform: none;
}

.form button:disabled:hover {
    background: rgba(107, 114, 128, 0.5);
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form {
        padding: 1.5rem;
        gap: 1.25rem;
    }
    
    .form input,
    .form textarea,
    .form select {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .form button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        place-self: stretch;
    }
}

@media (max-width: 480px) {
    .form {
        padding: 1rem;
        gap: 1rem;
    }
    
    .form input,
    .form textarea,
    .form select {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .form input[type="file"] {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .form input,
    .form textarea,
    .form select,
    .form button {
        border-width: 3px;
    }
    
    .form {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .form,
    .form input,
    .form textarea,
    .form select,
    .form button,
    .close ion-icon {
        animation: none;
        transition: none;
    }
    
    .form input:focus,
    .form textarea:focus,
    .form select:focus,
    .form button:hover,
    .close ion-icon:hover {
        transform: none;
    }
}
