/* ==========================================================================
   Settings & About page styles
   Scoped to .settings-header / .settings-container / .about-* classes only,
   so this can be loaded alongside the site's main style.css without
   overriding anything else.
   ========================================================================== */

:root {
    --stg-accent: #8B4513;
    --stg-accent-light: #A0522D;
    --stg-bg: #FBF8F3;
    --stg-card-bg: #FFFFFF;
    --stg-text: #2B2118;
    --stg-text-muted: #6B5D4F;
    --stg-border: #E8DFD3;
}

body.night-mode {
    --stg-bg: #17130E;
    --stg-card-bg: #221B13;
    --stg-text: #EDE3D3;
    --stg-text-muted: #B8A98F;
    --stg-border: #3A2F22;
}

body {
    background: var(--stg-bg);
    color: var(--stg-text);
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    transition: background 0.25s ease, color 0.25s ease;
}

/* -------------------- Header bar (Settings / About) -------------------- */

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--stg-accent);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.settings-header h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.settings-header .back-button {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    width: 28px;
    line-height: 1;
}

.settings-header .placeholder {
    width: 28px;
}

/* -------------------------- Layout containers --------------------------- */

.settings-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

.settings-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.section-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.section-icon {
    font-size: 1.1rem;
}

.settings-card {
    background: var(--stg-card-bg);
    border: 1px solid var(--stg-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* --------------------------- Rows / options ------------------------------ */

.setting-option,
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.border-top {
    border-top: 1px solid var(--stg-border);
}

.option-info,
.setting-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-title,
.setting-item-title {
    font-weight: 500;
}

.option-description {
    font-size: 0.8rem;
    color: var(--stg-text-muted);
}

.setting-item-control {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--stg-text-muted);
}

.font-size-value {
    font-size: 0.9rem;
}

.chevron {
    font-size: 1.1rem;
}

.version-number {
    color: var(--stg-text-muted);
    font-size: 0.9rem;
}

/* ------------------------------ Radio input ------------------------------ */

.radio-container {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.radio-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.radio-custom {
    position: absolute;
    inset: 0;
    border: 2px solid var(--stg-border);
    border-radius: 50%;
    background: var(--stg-card-bg);
    transition: border-color 0.2s ease;
    pointer-events: none;
}

.radio-custom::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--stg-accent);
    transform: scale(0);
    transition: transform 0.15s ease;
}

.radio-input:checked ~ .radio-custom {
    border-color: var(--stg-accent);
}

.radio-input:checked ~ .radio-custom::after {
    transform: scale(1);
}

/* ------------------------------ Toggle switch ----------------------------- */

.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--stg-border);
    border-radius: 999px;
    transition: background 0.2s ease;
    pointer-events: none;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked ~ .toggle-slider {
    background: var(--stg-accent);
}

.toggle-switch input:checked ~ .toggle-slider::before {
    transform: translateX(20px);
}

/* --------------------------------- About --------------------------------- */

.top-bar.header-container {
    background: var(--stg-accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar .contact-info a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.top-bar .social-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar .social-links .icon {
    width: 22px;
    height: 22px;
    color: #fff;
}

.about-hero {
    padding: 4px 0 18px;
}

.about-hero h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    color: var(--stg-accent);
}

.about-hero p {
    margin: 0;
    color: var(--stg-text-muted);
    line-height: 1.6;
}

.about-section {
    background: var(--stg-card-bg);
    border: 1px solid var(--stg-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    line-height: 1.7;
}

.about-section h2 {
    font-size: 1.05rem;
    color: var(--stg-accent);
    border-bottom: 2px solid var(--stg-border);
    padding-bottom: 8px;
    margin: 0 0 14px;
}

.about-section p {
    margin: 0 0 12px;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-section ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.about-section li {
    margin-bottom: 6px;
}

.about-section h3 {
    font-size: 0.95rem;
    color: var(--stg-text);
    margin: 16px 0 8px;
}

.works-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 0.88rem;
}

.works-table th,
.works-table td {
    border: 1px solid var(--stg-border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.works-table th {
    background: var(--stg-accent);
    color: #fff;
    font-weight: 600;
}

.works-table td.arabic {
    font-family: 'Amiri', serif;
    font-size: 1.15rem;
    direction: rtl;
    text-align: right;
    white-space: nowrap;
}
