/**
 * Factur-X Validator Styles
 */

.facturx-validator-container {
    max-width: 700px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.facturx-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Dropzone */
.facturx-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.facturx-dropzone:hover,
.facturx-dropzone.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.facturx-dropzone.dragover {
    transform: scale(1.01);
}

.facturx-dropzone-content {
    pointer-events: none;
}

.facturx-icon {
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.facturx-dropzone:hover .facturx-icon,
.facturx-dropzone.dragover .facturx-icon {
    color: #3b82f6;
}

.facturx-dropzone-text {
    font-size: 1.1rem;
    color: #475569;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.facturx-dropzone-hint {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
}

/* Progress */
.facturx-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: #3b82f6;
    font-weight: 500;
}

.facturx-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: facturx-spin 0.8s linear infinite;
}

@keyframes facturx-spin {
    to { transform: rotate(360deg); }
}

/* Result */
.facturx-result {
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.facturx-result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.facturx-status {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.facturx-status.valid {
    background: #dcfce7;
    color: #166534;
}

.facturx-status.invalid {
    background: #fee2e2;
    color: #991b1b;
}

.facturx-status.error {
    background: #fef3c7;
    color: #92400e;
}

.facturx-filename {
    color: #64748b;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Errors & Warnings */
.facturx-errors,
.facturx-warnings {
    padding: 1rem 1.25rem;
}

.facturx-errors {
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
}

.facturx-warnings {
    background: #fffbeb;
}

.facturx-errors h4,
.facturx-warnings h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.facturx-errors h4 {
    color: #991b1b;
}

.facturx-warnings h4 {
    color: #92400e;
}

.facturx-errors ul,
.facturx-warnings ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.facturx-errors li,
.facturx-warnings li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.facturx-errors li:last-child,
.facturx-warnings li:last-child {
    border-bottom: none;
}

.facturx-errors li::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: #dc2626;
    font-weight: bold;
}

.facturx-warnings li::before {
    content: "\26A0";
    position: absolute;
    left: 0;
    color: #d97706;
}

.facturx-errors li {
    color: #7f1d1d;
}

.facturx-warnings li {
    color: #78350f;
}

/* Debug */
.facturx-debug {
    padding: 1rem 1.25rem;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

.facturx-debug h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.facturx-debug pre {
    margin: 0;
    padding: 0.75rem;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Hidden state */
[hidden] {
    display: none !important;
}

/* WordPress Admin Adjustments */
.wrap .facturx-validator-container {
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 640px) {
    .facturx-validator-container {
        margin: 1rem;
    }

    .facturx-dropzone {
        padding: 2rem 1rem;
    }

    .facturx-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
