/* public/css/sys/controls.css - Global primitives (type, buttons, inputs, focus) */

html {
    color-scheme: light;
    -webkit-tap-highlight-color: transparent;
}

/* --- Global type baseline --- */
html, body {
    font-family: var(--pro-font-stack);
    font-size: 13px;
    font-weight: 400;
    color: var(--pro-text);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, strong, b, th, legend {
    font-weight: 600;
}
h1 { font-size: 20px; line-height: 1.3; }
h2 { font-size: 17px; line-height: 1.3; }
h3 { font-size: 15px; line-height: 1.35; }
h4 { font-size: 14px; line-height: 1.35; }

/* --- Focus --- */
:focus-visible {
    outline: 2px solid var(--pro-accent);
    outline-offset: 2px;
}

/* --- Explicit Arabic opt-in (unicode-range in @font-face covers inline Arabic automatically) --- */
.is-arabic,
[lang="ar"] {
    font-family: var(--pro-font-arabic);
    direction: rtl;
    text-align: right;
    line-height: 1.9;
    font-size: 1.15em;
}

/* --- Global buttons --- */
.siteos-button,
button:not(.siteos-window-btn):not(.siteos-audio-btn) {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--pro-text);
    background: var(--pro-surface);
    border: 1px solid var(--pro-border-strong);
    border-radius: var(--pro-radius-sm);
    padding: 7px 14px;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.2;
    transition: background var(--pro-transition), border-color var(--pro-transition), color var(--pro-transition);
}
.siteos-button:hover,
button:not(.siteos-window-btn):not(.siteos-audio-btn):hover {
    background: var(--pro-surface-sunken);
    border-color: var(--pro-text-muted);
}
.siteos-button:active,
button:not(.siteos-window-btn):not(.siteos-audio-btn):active {
    background: var(--pro-border);
}
.siteos-button:focus-visible,
button:not(.siteos-window-btn):not(.siteos-audio-btn):focus-visible {
    border-color: var(--pro-accent);
    box-shadow: var(--pro-focus-ring);
    outline: none;
}
.siteos-button:disabled,
button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.siteos-button.primary,
button.primary,
button[type="submit"] {
    background: var(--pro-accent);
    color: var(--pro-text-inverse);
    border-color: var(--pro-accent);
}
.siteos-button.primary:hover,
button.primary:hover,
button[type="submit"]:hover {
    background: var(--pro-accent-hover);
    border-color: var(--pro-accent-hover);
    color: var(--pro-text-inverse);
}

/* --- Global form fields --- */
.siteos-input,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
    font-family: inherit;
    font-size: 13px;
    color: var(--pro-text);
    background: var(--pro-surface);
    border: 1px solid var(--pro-border-strong);
    border-radius: var(--pro-radius-sm);
    padding: 6px 10px;
    box-sizing: border-box;
    outline: none;
    transition: border-color var(--pro-transition), box-shadow var(--pro-transition);
}
.siteos-input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--pro-accent);
    box-shadow: var(--pro-focus-ring);
}
textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}

/* --- Utilities --- */
.xp-start-menu-header-icon {
    font-size: 24px;
    margin-right: 8px;
}

.siteos-copy-feedback {
    position: fixed;
    background: rgba(31, 41, 55, 0.92);
    color: var(--pro-text-inverse);
    padding: 6px 12px;
    border-radius: var(--pro-radius-sm);
    font-size: 12px;
    pointer-events: none;
    z-index: 10000;
    font-family: var(--pro-font-stack);
    box-shadow: var(--pro-shadow-md);
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
    color: inherit;
}
