/* Fireside Custom Styles - Clean, Minimal, Accessible */

:root {
    --primary-black: #1a1a1a;
    --secondary-black: #2d2d2d;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --background-light: #f8f8f8;
    --white: #ffffff;
    --accent-color: #0066cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
}

/* Create New Conundrum Button - Orange */
.button.btn-create-conundrum,
.button.btn-create-conundrum:hover,
.button.btn-create-conundrum:focus {
    background-color: #e67e22;
    color: #ffffff;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    margin: 0;
    padding: 0;
}

/* Top Bar - Solid Black Header */
.top-bar {
    background-color: #000000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.top-bar .menu {
    margin: 0;
    background-color: transparent !important;
}

.top-bar ul {
    background-color: transparent !important;
}

.top-bar .menu a {
    color: #ffffff;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.top-bar .menu a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.top-bar .menu-text a {
    padding: 0;
}

.top-bar .menu-text a:hover {
    background-color: transparent;
}

.logo-image {
    height: 36px;
    vertical-align: middle;
    filter: brightness(0) invert(1); /* Make logo white */
}

.user-greeting {
    color: #ffffff;
    padding: 0.5rem 1rem;
    display: inline-block;
    font-weight: 500;
}

/* Main Content */
.grid-container {
    /* min-height: calc(100vh - 180px); */
    padding: 2rem 1rem;
    max-width: 1200px;
}

/* Footer */
.footer {
    background-color: var(--background-light);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent-color);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-black);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Callouts */
.callout {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    padding: 2rem;
    margin-bottom: 1.5rem;
    min-height: 250px;
}

.callout.primary {
    border-left: 4px solid var(--accent-color);
}

.callout.success {
    border-left: 4px solid var(--success-color);
    background-color: #f0f9f4;
}

.callout.alert {
    border-left: 4px solid var(--error-color);
    background-color: #fef5f5;
}

.callout.warning {
    border-left: 4px solid var(--warning-color);
    background-color: #fffbf0;
}

.callout.secondary {
    background-color: var(--background-light);
    border-color: var(--border-color);
}

.callout h3,
.callout h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-black);
}

.callout ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.callout ul li {
    margin-bottom: 0.5rem;
}

/* Forms */
label {
    color: var(--primary-black);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s ease;
    background-color: var(--white);
    color: var(--text-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input[readonly] {
    background-color: var(--background-light);
    cursor: not-allowed;
}

.help-text {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Buttons */
.button {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button:active {
    transform: translateY(0);
}

.button.primary,
.button {
    background-color: var(--primary-black);
    color: var(--white);
}

.button.primary:hover,
.button:hover {
    background-color: var(--secondary-black);
    color: var(--white);
}

.button.secondary {
    background-color: var(--white);
    color: var(--primary-black);
    border: 2px solid var(--primary-black);
}

.button.secondary:hover {
    background-color: var(--primary-black);
    color: var(--white);
}

.button.expanded {
    width: 100%;
}

.button i {
    margin-right: 0.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: var(--primary-black);
}

.dashboard-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.dashboard-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Dashboard Stat Boxes */
.stat-box {
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
}

.stat-box__number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-box__icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-box__label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.stat-box--blue {
    background-color: #ebf5fb;
    color: #2471a3;
}

.stat-box--blue .stat-box__icon {
    color: #1a5276;
}

.stat-box--green {
    background-color: #eafaf1;
    color: #1e8449;
}

.stat-box--green .stat-box__icon {
    color: #145a32;
}

.stat-box--purple {
    background-color: #f4ecf7;
    color: #7d3c98;
}

.stat-box--purple .stat-box__icon {
    color: #512e5f;
}

.stat-box--amber {
    background-color: #fef9e7;
    color: #b7950b;
}

.stat-box--amber .stat-box__icon {
    color: #7d6608;
}

/* New Activity Indicator on Conundrum Cards */
.dashboard-card--new-activity {
    border: 2px solid #e67e22;
}

.new-activity-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fef5e7;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.new-activity-badge__count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: #e67e22;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.new-activity-badge__label {
    color: #e67e22;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Account Dropdown in Top Bar */
.nav-dropdown {
    position: relative;
}

.nav-dropdown__menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #000000 !important;
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.25rem 0;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.nav-dropdown__menu,
.nav-dropdown__menu li {
    background: #000000 !important;
    background-color: #000000 !important;
}

.nav-dropdown:hover .nav-dropdown__menu {
    display: block;
}

.nav-dropdown__menu li {
    list-style: none;
    padding: 0;
}

.nav-dropdown__menu li a {
    color: #ffffff !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem;
    display: block;
    text-decoration: none;
}

.nav-dropdown__menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.nav-dropdown__menu li a i {
    width: 1.2em;
    text-align: center;
    margin-right: 0.5rem;
}

/* Security Page Styles */
.security-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.security-method-badge--totp {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.security-method-badge--magic-link {
    background-color: #e3f2fd;
    color: #1565c0;
}

.login-history-table {
    width: 100%;
    font-size: 0.9rem;
}

.login-history-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    border-bottom: 2px solid var(--border-color);
    padding: 0.5rem;
    text-align: left;
}

.login-history-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* TOTP Code Input */
.totp-code-input {
    font-family: monospace !important;
    font-size: 1.5rem !important;
    letter-spacing: 0.3em !important;
    text-align: center !important;
    padding: 0.75rem !important;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

/* Spacing */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Responsive */
@media screen and (max-width: 640px) {
    .top-bar {
        padding: 1rem;
    }

    .top-bar .menu a {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .grid-container {
        padding: 1rem;
    }

    .callout {
        padding: 1.5rem;
    }
}

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

/* Skip to main content (Accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-black);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* New stat box colours */
.stat-box--teal {
    background-color: #e0f7fa;
    color: #00796b;
}

.stat-box--teal .stat-box__icon {
    color: #004d40;
}

.stat-box--rose {
    background-color: #fce4ec;
    color: #c62828;
}

.stat-box--rose .stat-box__icon {
    color: #b71c1c;
}

/* ── Discover Feed ────────────────────────────────────── */

.feed-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.feed-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #bbb;
}

.feed-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.feed-card__match {
    display: inline-block;
    background: #f0f4ff;
    color: #667eea;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.feed-card__type {
    display: inline-block;
    background: var(--background-light);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: capitalize;
}

.feed-card__title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.feed-card__excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.feed-card__convener {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.feed-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tag--matched {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.feed-card__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feed-card__contributed {
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.feed-card__contributed i {
    margin-right: 0.25rem;
}

.feed-card__metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.feed-card__metric {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.feed-card__metric i {
    font-size: 0.75rem;
}

.feed-card__podcast {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    text-decoration: none;
    margin-left: auto;
    transition: background 0.2s;
}

.feed-card__podcast:hover {
    background: #ffe0b2;
    color: #bf360c;
}

.feed-card__contributed-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--success-color);
    font-size: 1.25rem;
}

.feed-card--active {
    border-left: 4px solid #e67e22;
}

.feed-card--participating {
    background: #fafcff;
    border-color: #c5d9f0;
}

.feed-card--participating.feed-card--active {
    border-left: 4px solid #e67e22;
    border-top-color: #c5d9f0;
    border-right-color: #c5d9f0;
    border-bottom-color: #c5d9f0;
}

.feed-card__activity {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.feed-card__participant-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

.feed-card__solved {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

.feed-card__new-badge {
    display: inline-block;
    background: #e53935;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: -0.25rem;
}

/* ── Perspective Modal ────────────────────────────────── */

.perspective-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.perspective-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.perspective-modal__content {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.perspective-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ── Onboarding Wizard ─────────────────────────────────── */

.onboarding-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.onboarding-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 0.75rem;
}

.onboarding-progress__step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.onboarding-progress__step--active {
    border-color: var(--primary-black);
    background: var(--primary-black);
    color: var(--white);
}

.onboarding-progress__step--done {
    border-color: var(--success-color);
    background: var(--success-color);
    color: var(--white);
}

.onboarding-progress__bar {
    width: 60px;
    height: 2px;
    background: var(--border-color);
}

.onboarding-progress__bar--done {
    background: var(--success-color);
}
