/**
 * inSigner Public Shared Styles
 * Shared base for all public-facing status/message pages.
 * Supports light/dark theme via [data-theme].
 *
 * @package inSigner
 * @since 3.17.0
 */

/* ============================================
   CSS VARIABLES - PUBLIC THEME
   ============================================ */

:root {
    color-scheme: light;

    /* Light Theme (Default) */
    --wps-bg: #f5f5f7;
    --wps-bg-secondary: #ffffff;
    --wps-surface: #ffffff;
    --wps-surface-hover: #f0f0f2;
    --wps-border: #e5e5ea;
    --wps-border-strong: #c7c7cc;
    --wps-text: #1d1d1f;
    --wps-text-secondary: #6e6e73;
    --wps-text-muted: #8e8e93;
    --wps-primary: #4f46e5;
    --wps-primary-hover: #4338ca;
    --wps-primary-light: rgba(79, 70, 229, 0.08);
    --wps-success: #059669;
    --wps-error: #dc2626;
    --wps-warning: #d97706;
    --wps-info: #2563eb;
    --wps-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --wps-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --wps-radius: 8px;
    --wps-radius-lg: 16px;
    --wps-radius-sm: 4px;
    --wps-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --wps-header-height: 64px;

    /* Font sizes */
    --wps-fs-display-sm: 32px;
    --wps-fs-headline-lg: 28px;
    --wps-fs-headline-md: 24px;
    --wps-fs-headline-sm: 20px;
    --wps-fs-title-lg: 18px;
    --wps-fs-title-md: 16px;
    --wps-fs-title-sm: 15px;
    --wps-fs-body-lg: 14px;
    --wps-fs-body-md: 13px;
    --wps-fs-body-sm: 12px;
    --wps-fs-label-sm: 11px;
    --wps-fs-caption: 10px;

    /* Font weights */
    --wps-fw-regular: 400;
    --wps-fw-medium: 500;
    --wps-fw-semibold: 600;
    --wps-fw-bold: 700;
}

html[data-theme="light"] {
    color-scheme: only light;
}

/* Dark Theme */
[data-theme="dark"] {
    color-scheme: dark;
    --wps-bg: #0f0f0f;
    --wps-bg-secondary: #1a1a1a;
    --wps-surface: #1e1e1e;
    --wps-surface-hover: #2a2a2a;
    --wps-border: rgba(255, 255, 255, 0.1);
    --wps-border-strong: rgba(255, 255, 255, 0.2);
    --wps-text: #f5f5f7;
    --wps-text-secondary: #a1a1a6;
    --wps-text-muted: #6e6e73;
    --wps-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --wps-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ============================================
   BASE RESET
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
    font-family: var(--wps-font);
    font-size: var(--wps-fs-body-lg);
    line-height: 1.5;
    color: var(--wps-text);
    background: var(--wps-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   STATUS PAGE LAYOUT , Full Width
   ============================================ */

.wps-status-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Header */
.wps-status-header {
    height: var(--wps-header-height);
    background: var(--wps-bg-secondary);
    border-bottom: 1px solid var(--wps-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    width: 100%;
}

.wps-status-header-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.wps-status-header-logo img {
    height: 32px;
    width: auto;
}

.wps-status-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--wps-text);
    letter-spacing: -0.02em;
}

/* Main content area , full width, centered card */
.wps-status-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
}

/* Status Card */
.wps-status-card {
    max-width: 520px;
    width: 100%;
    background: var(--wps-surface);
    border: 1px solid var(--wps-border);
    border-radius: var(--wps-radius-lg);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--wps-shadow-lg);
}

/* Icon circle */
.wps-status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wps-status-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.wps-status-icon-success {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}

.wps-status-icon-error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
}

.wps-status-icon-info {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.wps-status-icon-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.3);
}

/* Title */
.wps-status-title {
    font-size: var(--wps-fs-headline-md);
    font-weight: var(--wps-fw-bold);
    color: var(--wps-text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

/* Message */
.wps-status-message {
    font-size: var(--wps-fs-title-sm);
    color: var(--wps-text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Sub-message / footer note */
.wps-status-note {
    font-size: var(--wps-fs-body-md);
    color: var(--wps-text-muted);
    margin-top: 20px;
}

/* Meta info box */
.wps-status-meta {
    margin-top: 20px;
    padding: 16px;
    background: var(--wps-surface-hover);
    border-radius: var(--wps-radius);
    border: 1px solid var(--wps-border);
}

.wps-status-meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: var(--wps-fs-body-md);
    color: var(--wps-text-secondary);
}

.wps-status-meta-item:last-child {
    margin-bottom: 0;
}

.wps-status-meta-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wps-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.wps-status-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
    border-radius: var(--wps-radius);
    font-size: var(--wps-fs-body-md);
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}

.wps-status-action-primary {
    background: var(--wps-text, #1a1a2e);
    color: #fff;
}

.wps-status-action-primary:hover,
.wps-status-action-primary:focus {
    color: #fff;
    opacity: 0.92;
}

.wps-status-action-secondary {
    background: transparent;
    color: var(--wps-text);
    border: 1px solid var(--wps-border);
}

.wps-status-action-secondary:hover,
.wps-status-action-secondary:focus {
    color: var(--wps-text);
    background: var(--wps-surface-hover);
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.wps-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--wps-border);
    background: var(--wps-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.wps-theme-toggle:hover {
    background: var(--wps-surface-hover);
    border-color: var(--wps-border-strong);
}

.wps-theme-toggle svg {
    width: 18px;
    height: 18px;
    color: var(--wps-text-secondary);
}

.wps-theme-toggle .icon-sun {
    display: none;
}

.wps-theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .wps-theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .wps-theme-toggle .icon-moon {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .wps-status-card {
        padding: 32px 24px;
        border-radius: var(--wps-radius);
    }

    .wps-status-title {
        font-size: var(--wps-fs-headline-sm);
    }

    .wps-status-header {
        padding: 0 16px;
    }

    .wps-status-icon {
        width: 64px;
        height: 64px;
    }

    .wps-status-icon svg {
        width: 32px;
        height: 32px;
    }
}