/**
 * RHW Datanorm to CSV Converter Styles
 * Modern, professional design
 */

.rhw-datanorm-converter-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.rhw-datanorm-converter {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    border: 1px solid #e5e7eb;
}

.rhw-datanorm-converter h3,
.rhw-datanorm-converter-wrapper h3 {
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
    color: #1f2937 !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.rhw-description {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
}

.rhw-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rhw-file-upload-area {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rhw-file-upload-area:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.rhw-file-upload-area.drag-over {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: scale(1.01);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.2);
}

.rhw-file-upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.rhw-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    pointer-events: none;
    width: 100%;
}

.rhw-upload-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.rhw-file-upload-area:hover .rhw-upload-icon {
    transform: scale(1.1);
}

.rhw-upload-text {
    font-size: 1.25rem;
    color: #1f2937;
    font-weight: 600;
    margin: 0;
}

.rhw-upload-hint {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

.rhw-file-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.rhw-file-info p {
    margin: 0.5rem 0;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.6;
}

.rhw-file-info p:first-child {
    margin-top: 0;
}

.rhw-file-info p:last-child {
    margin-bottom: 0;
}

.rhw-file-info strong {
    color: #3b82f6;
    font-weight: 600;
}

.rhw-privacy-notice {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 4px solid #10b981;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.rhw-privacy-text {
    margin: 0;
    color: #1f2937!important;
    font-size: 0.9rem;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.rhw-privacy-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.rhw-privacy-text strong {
    color: #10b981!important;
    font-weight: 600;
}

.rhw-convert-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.rhw-convert-btn::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;
}

.rhw-convert-btn:hover:not(:disabled)::before {
    left: 100%;
}

.rhw-convert-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.rhw-convert-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.rhw-convert-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.rhw-convert-btn:disabled::before {
    display: none;
}

.rhw-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 4px solid #ef4444;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    color: #dc2626;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.rhw-file-upload-area.loading {
    pointer-events: none;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rhw-datanorm-converter-wrapper {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }
    
    .rhw-datanorm-converter {
        padding: 1.5rem;
        border-radius: 10px;
    }
    
    .rhw-datanorm-converter h3,
    .rhw-datanorm-converter-wrapper h3 {
        font-size: 1.5rem !important;
        color: #1f2937 !important;
    }
    
    .rhw-file-upload-area {
        padding: 2rem 1.5rem;
        min-height: 180px;
    }
    
    .rhw-upload-icon {
        font-size: 3rem;
    }
    
    .rhw-upload-text {
        font-size: 1.1rem;
    }
    
    .rhw-upload-hint {
        font-size: 0.8rem;
    }
    
    .rhw-convert-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
    
    .rhw-file-info {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .rhw-datanorm-converter {
        padding: 1.25rem;
    }
    
    .rhw-datanorm-converter h3,
    .rhw-datanorm-converter-wrapper h3 {
        font-size: 1.35rem !important;
        color: #1f2937 !important;
    }
    
    .rhw-file-upload-area {
        padding: 1.5rem 1rem;
        min-height: 160px;
    }
    
    .rhw-upload-icon {
        font-size: 2.5rem;
    }
    
    .rhw-upload-text {
        font-size: 1rem;
    }
    
    .rhw-upload-hint {
        font-size: 0.75rem;
    }
}

/* Print styles */
@media print {
    .rhw-datanorm-converter {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .rhw-file-upload-area,
    .rhw-convert-btn {
        display: none;
    }
}
