/* Enhanced Form Styles - Additional Features */

/* Floating Labels */
.form-label {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-label.floating {
    transform: translateY(-25px) scale(0.85);
    color: #0066cc;
    font-weight: 700;
}

/* Focus States */
.form-group.focused {
    transform: translateX(5px);
}

.form-group.focused .form-label i {
    animation: iconSpin 0.6s ease-out;
}

/* Validation States */
.form-group.is-valid .form-control {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-group.is-valid .input-group-icon {
    color: #28a745;
}

.form-group.is-invalid .form-control {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group.is-invalid .input-group-icon {
    color: #dc3545;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 10px;
    border-left: 3px solid #0066cc;
}

.strength-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    display: block;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 1.25rem 1.75rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    min-width: 300px;
    backdrop-filter: blur(20px);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #28a745;
    color: #155724;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
}

.notification-error {
    border-left: 4px solid #dc3545;
    color: #721c24;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
}

.notification-info {
    border-left: 4px solid #17a2b8;
    color: #0c5460;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(0, 102, 204, 0.1) 100%);
}

.notification i {
    font-size: 1.2rem;
    animation: notificationIcon 0.6s ease-out;
}

@keyframes notificationIcon {
    0% { transform: scale(0) rotate(180deg); }
    50% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Loading States */
.form-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(0, 102, 204, 0.1);
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Animations */
@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes inputBlur {
    0% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes fieldSuccess {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

@keyframes fieldError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes fieldSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconSpin {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(180deg); }
    100% { transform: scale(1.2) rotate(5deg); }
}

/* Enhanced Button States */
.btn-form:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-form:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Enhanced Form Groups */
.form-group {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group:hover {
    transform: translateX(5px);
}

.form-group.focused {
    transform: translateX(8px);
}

/* Enhanced Input Groups */
.input-group {
    position: relative;
    transition: all 0.3s ease;
}

.input-group:hover .input-group-icon {
    transform: translateY(-50%) scale(1.1);
            color: #ff6600;
}

/* Enhanced Help Text */
.help-text {
    position: relative;
    overflow: hidden;
}

.help-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.1), transparent);
    transition: left 0.6s ease;
}

.help-text:hover::before {
    left: 100%;
}

/* Enhanced Validation Messages */
.validation-message {
    position: relative;
    overflow: hidden;
    display: none; /* Hide validation messages by default */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
}

/* Show validation messages when form is submitted or field is touched */
.form-submitted .validation-message,
.field-touched .validation-message,
.validation-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInValidation 0.3s ease-out;
}

.validation-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: validationShimmer 2s infinite;
}

@keyframes validationShimmer {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(200%) skewX(-15deg); }
}

@keyframes slideInValidation {
    0% { 
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Checkboxes */
.form-check-input:checked {
    animation: checkboxPop 0.3s ease-out;
}

@keyframes checkboxPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

/* Enhanced Select Dropdowns */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23764ba2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Enhanced Form Container */
.form-container {
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #0066cc, #ff6600, #0099ff, #ff9933);
    background-size: 200% 100%;
    animation: gradientShift 4s ease-in-out infinite;
}

/* Enhanced Header Banner */
.form-header-banner {
    position: relative;
    overflow: hidden;
}

.form-header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 4s ease-in-out infinite;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .password-strength {
        padding: 0.5rem;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .notification {
        background: rgba(30, 30, 30, 0.95);
        color: white;
    }
    
    .password-strength {
        background: rgba(0, 102, 204, 0.2);
    }
    
    .strength-bar {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Indicators */
.form-control:focus,
.form-select:focus,
.btn-form:focus,
.form-check-input:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control,
    .form-select {
        border-width: 2px;
    }
    
    .btn-form {
        border: 2px solid currentColor;
    }
    
    .notification {
        border: 2px solid currentColor;
    }
} 

/* File Upload Styling */
.file-upload-container {
    position: relative;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-container:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.file-upload-container.dragover {
    border-color: #28a745;
    background: #d4edda;
    transform: scale(1.02);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #6c757d;
    pointer-events: none;
}

.file-upload-info i {
    font-size: 2rem;
    color: #007bff;
}

.file-upload-info span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Image Preview Styling */
.image-preview-container {
    margin-top: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
    color: #495057;
}

.image-preview-header button {
    padding: 2px 8px;
    font-size: 0.8rem;
}

.image-preview-content {
    padding: 15px;
    text-align: center;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Form validation styling for file inputs */
.file-upload-container.is-invalid {
    border-color: #dc3545;
    background: #f8d7da;
}

.file-upload-container.is-valid {
    border-color: #28a745;
    background: #d4edda;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-upload-container {
        padding: 15px;
    }
    
    .file-upload-info i {
        font-size: 1.5rem;
    }
    
    .file-upload-info span {
        font-size: 0.8rem;
    }
    
    .image-preview-content img {
        max-height: 150px;
    }
} 

/* Current Image Display Styling */
.current-image-container {
    margin-top: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.current-image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
    color: #495057;
}

.current-image-content {
    padding: 15px;
    text-align: center;
}

.current-image-content img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-upload-container {
        padding: 15px;
    }
    
    .file-upload-info i {
        font-size: 1.5rem;
    }
    
    .file-upload-info span {
        font-size: 0.8rem;
    }
    
    .image-preview-content img {
        max-height: 150px;
    }
    
    .current-image-content img {
        max-height: 120px;
    }
} 

/* Subject Icon Display in Details */
.subject-icon-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.subject-icon {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subject-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.icon-info {
    text-align: center;
}

.icon-info small {
    display: block;
    word-break: break-all;
    max-width: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-upload-container {
        padding: 15px;
    }
    
    .file-upload-info i {
        font-size: 1.5rem;
    }
    
    .file-upload-info span {
        font-size: 0.8rem;
    }
    
    .image-preview-content img {
        max-height: 150px;
    }
    
    .current-image-content img {
        max-height: 120px;
    }
    
    .subject-icon {
        max-width: 100px;
        max-height: 100px;
    }
    
    .icon-info small {
        max-width: 150px;
    }
} 

/* Subject Icon Thumbnails in Index */
.subject-icon-small {
    display: flex;
    justify-content: center;
    align-items: center;
}

.subject-icon-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subject-icon-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.subject-icon-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
}

.subject-icon-placeholder i {
    font-size: 1.2rem;
    color: #adb5bd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-upload-container {
        padding: 15px;
    }
    
    .file-upload-info i {
        font-size: 1.5rem;
    }
    
    .file-upload-info span {
        font-size: 0.8rem;
    }
    
    .image-preview-content img {
        max-height: 150px;
    }
    
    .current-image-content img {
        max-height: 120px;
    }
    
    .subject-icon {
        max-width: 100px;
        max-height: 100px;
    }
    
    .icon-info small {
        max-width: 150px;
    }
    
    .subject-icon-thumbnail {
        width: 32px;
        height: 32px;
    }
    
    .subject-icon-placeholder {
        width: 32px;
        height: 32px;
    }
    
    .subject-icon-placeholder i {
        font-size: 1rem;
    }
} 