/**
 * Document Uploader Styles
 */

/* Main wrapper */
.doc-uploader-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Form container */
.doc-uploader-form {
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Form title and description */
.doc-uploader-form-title {
    margin: 0 0 1rem 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.doc-uploader-form-description {
    margin: 0 0 1.5rem 0;
    color: #666;
    line-height: 1.6;
}

/* Error messages in form */
.doc-uploader-error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #5a1f22;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Form fields */
.doc-uploader-field {
    margin-bottom: 1.5rem;
}

.doc-uploader-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 14px;
}

.doc-uploader-field .required {
    color: #d63638;
}

.doc-uploader-field input[type="text"],
.doc-uploader-field input[type="email"],
.doc-uploader-field input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.doc-uploader-field input[type="text"]:focus,
.doc-uploader-field input[type="email"]:focus,
.doc-uploader-field input[type="file"]:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.doc-uploader-field input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}

/* Help text */
.doc-uploader-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Submit button */
.doc-uploader-submit {
    width: 100%;
    padding: 1rem;
    background: #2271b1;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.doc-uploader-submit:hover {
    background: #135e96;
}

.doc-uploader-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Progress indicator */
.doc-uploader-progress {
    margin-top: 1rem;
}

.doc-uploader-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.doc-uploader-progress-fill {
    height: 100%;
    background: #2271b1;
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

.doc-uploader-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Messages */
.doc-uploader-messages {
    margin-bottom: 1.5rem;
}

.doc-uploader-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 14px;
    line-height: 1.5;
}

.doc-uploader-message:last-child {
    margin-bottom: 0;
}

.doc-uploader-message.success {
    background: #d7f8e9;
    border-left: 4px solid #00a32a;
    color: #004d19;
}

.doc-uploader-message.error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #5a1f22;
}

.doc-uploader-message.info {
    background: #e5f5fa;
    border-left: 4px solid #2271b1;
    color: #0c3b57;
}

/* Form in loading state */
.doc-uploader-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive design */
@media (max-width: 640px) {
    .doc-uploader-field {
        margin-bottom: 1.25rem;
    }
}

/* Accessibility improvements */
.doc-uploader-field input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #d63638;
}

.doc-uploader-field input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #00a32a;
}

/* Loading spinner for submit button */
.doc-uploader-submit.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Download button styles */
.doc-uploader-message.download-ready {
    text-align: center;
    padding: 2rem;
}

.doc-uploader-message-text {
    margin: 0 0 1.5rem 0;
    font-size: 16px;
    font-weight: 600;
}

.doc-uploader-download-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: #2271b1;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.doc-uploader-download-btn:hover {
    background: #135e96;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
    transform: translateY(-2px);
}

.doc-uploader-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
}

