/**
 * Original Theme - Pico CSS (Light)
 *
 * A clean, modern theme with:
 * - Light background
 * - Crisp card surfaces
 * - Clear CTA buttons
 * - Responsive navigation
 */

:root {
    --brand-primary: #1d4ed8;
    --brand-accent: #f59e0b;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --text-color: #1f2937;
    --border-color: #e2e8f0;
    --shadow-color: rgba(15, 23, 42, 0.08);

    --card-dark-bg: #1f2937;
    --card-light-bg: #ffffff;
    --text-light: #f8fafc;
    --text-dark: #1f2937;

    --btn-cta-color: #f59e0b;
    --btn-cta-hover: #d97706;

    --card-padding: 1.25rem;
    --card-border-radius: 0.75rem;
}

body {
    background-color: #f8fafc;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 1.5rem 0 3rem;
}

.main-content {
    padding-top: 1.5rem;
}

body > header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

body > footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

container {
    display: block;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

brand {
    display: block;
    font-weight: 600;
}

brand > a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: inherit;
    text-decoration: none;
}

brand > a > logo {
    display: block;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-image: url('/Assets/img/logo.defined.me.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

brand > a > span {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.3;
}

menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

menu > a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.35rem 0.65rem;
    border-radius: 0.4rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

menu > a:hover {
    background-color: var(--surface-muted);
}

menu > a.active {
    color: var(--brand-primary);
    font-weight: 600;
}

header nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

header nav > menu {
    margin-left: auto;
}

footer container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

footer p {
    margin: 0;
    color: #64748b;
}

toolbar {
    display: block;
    padding: 1rem 0;
}

article[role="alert"] {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    margin-bottom: 0.75rem;
}

article.success {
    background-color: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

article.danger {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
}

article.warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

article.info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.card,
article.card,
article.box,
div.box {
    background-color: var(--card-light-bg);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.card.is-dark {
    background-color: var(--card-dark-bg);
    color: var(--text-light);
}

.card.is-dark .card-header-title,
.card.is-dark .title,
.card.is-dark .subtitle,
.card.is-dark .content,
.card.is-dark p {
    color: var(--text-light);
}

.tag,
div.tag {
    background-color: var(--surface-muted);
    color: var(--text-color);
    border-radius: 0.35rem;
    display: inline-block;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.button,
button.button,
a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--surface);
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button.is-light {
    background-color: var(--surface);
}

.button.is-primary,
.button.is-cta,
.button.is-orange {
    background-color: var(--btn-cta-color);
    border-color: var(--btn-cta-color);
    color: #ffffff;
}

.button.is-primary:hover,
.button.is-cta:hover,
.button.is-orange:hover {
    background-color: var(--btn-cta-hover);
    border-color: var(--btn-cta-hover);
}

.button.is-info {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.button.is-success {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.button.is-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
}

.button.is-danger {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.card-link {
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    height: 100%;
}

.card-link:hover {
    color: var(--text-dark);
    text-decoration: none;
}

.card-content-relative {
    position: relative;
}

.progress-circle {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 64px;
    height: 64px;
}

.preserve-whitespace {
    white-space: pre-wrap;
}

.form-inline {
    display: inline;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-actions .button,
.form-actions button,
.form-actions a.button {
    width: auto;
}

/* Schedule actions for single view */
.schedule-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.schedule-actions .button,
.schedule-actions button {
    width: auto;
    display: inline-block;
}

.schedule-actions .button.is-danger,
.schedule-actions button[type="submit"],
.schedule-actions form {
    width: auto;
    display: inline-block;
}

/* Notification actions */
.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.notification-actions a,
.notification-actions button,
.notification-actions form {
    width: auto;
    display: inline-block;
}

/* Single view action buttons (Fire, Delete, etc.) */
.card-footer-item form button,
.card-footer-item .button {
    width: auto;
    display: inline-block;
}

.icon-48 {
    font-size: 48px;
}

.mb-2 {
    margin-bottom: 2rem;
}

.card-footer-link {
    color: var(--text-dark);
}

.card-footer-link:hover {
    color: var(--text-dark);
    background-color: transparent;
}

.button-no-border,
.button-small-no-border {
    border: none;
}

.results-box,
.results-box-large {
    margin-top: 0.5rem;
    padding: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--surface);
}

.results-box-large {
    max-height: 300px;
}

.spinner-hidden {
    display: none;
}

.progress-circle-large {
    width: 80px;
    height: 80px;
}

.progress-text-subtle {
    font-size: 0.9em;
    color: #64748b;
}

.form-no-margin {
    margin: 0;
}

.progress-fixed {
    width: 200px;
    height: 20px;
}

.box-gray {
    background-color: var(--surface-muted);
}

.level-right-column {
    flex-direction: column;
    align-items: flex-end;
}

.text-centered-spaced {
    text-align: center;
    margin-bottom: 0.5rem;
}

.text-centered-top-spaced {
    text-align: center;
    margin-top: 0.5rem;
}

.is-visible {
    display: block;
}

.is-hidden {
    display: none !important;
}

.intensive-focus-window {
    display: none;
}

.cta-text-full {
    display: inline;
}

.cta-text-short {
    display: none;
}

@media (max-width: 768px) {
    brand > a > span {
        display: none;
    }

    header nav {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav > menu {
        width: 100%;
    }

    header nav > menu > a {
        flex: 1 1 calc(50% - 0.75rem);
        text-align: center;
        background-color: var(--surface-muted);
        border-radius: 0.45rem;
        padding: 0.6rem 0.5rem;
    }

    footer container {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-text-full {
        display: none;
    }

    .cta-text-short {
        display: inline;
    }
}

@media (max-width: 480px) {
    header nav > menu > a {
        flex: 1 1 100%;
    }

    footer container {
        align-items: center;
        text-align: center;
    }
}

/* Delete Study Button - Right Aligned on Study Cards */
.delete-study-btn {
    position: absolute;
    top: -1rem;
    right: -1rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-study-btn:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.delete-study-btn:active {
    transform: scale(0.95);
}

/* Profile Tabs - Grid Layout */
.profile-tabs-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
    background: none;
    justify-content: center;
}

.profile-tabs-list li {
    list-style: none;
    background: none;
    padding: 0;
    margin: 0;
}

.profile-tabs-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    background-color: var(--surface);
    color: var(--text-color);
}

.profile-tabs-list li a span {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.profile-tabs-list li a .icon {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

/* Active Tab - Primary Button Styling */
.profile-tabs-list li.is-active a {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(29, 78, 216, 0.3);
    transform: translateY(-1px);
}

.profile-tabs-list li.is-active a:hover {
    background-color: #1e40af;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(29, 78, 216, 0.4);
}

/* Inactive Tabs - Light Button Styling */
.profile-tabs-list li:not(.is-active) a {
    background-color: var(--surface-muted);
    border-color: var(--border-color);
}

.profile-tabs-list li:not(.is-active) a:hover {
    background-color: #ffffff;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Mobile Responsive - Grid adjusts to screen size */
@media (max-width: 768px) {
    .profile-tabs-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .profile-tabs-list li a {
        font-size: 0.8rem;
        padding: 0.6rem 0.4rem;
        min-height: 3.5rem;
    }
}

/* Very small screens - single column grid */
@media (max-width: 480px) {
    .profile-tabs-list {
        grid-template-columns: 1fr;
    }

    .profile-tabs-list li a {
        font-size: 0.9rem;
        padding: 0.8rem 0.5rem;
        min-height: 3rem;
    }
}
