/* ==========================================================================
   Strats - Strava Statistics App
   BEM methodology: Block__Element--Modifier
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base / Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #f5f5f5;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: #fc4c02; /* Strava orange */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

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

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout__main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.layout__footer {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 0.875rem;
}


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s, opacity 0.15s;
}

.btn:hover {
    text-decoration: none;
}

.btn--primary {
    background-color: #fc4c02;
    color: #fff;
}

.btn--primary:hover {
    background-color: #e04400;
}

.btn--secondary {
    background-color: #e0e0e0;
    color: #1a1a1a;
}

.btn--secondary:hover {
    background-color: #d0d0d0;
}

.btn--strava {
    background-color: #fc4c02;
    color: #fff;
}

.btn--strava:hover {
    background-color: #e04400;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
    position: relative;
    background-color: #fff;
    border-radius: 0.5rem;
    border: 2px solid rgba(252, 76, 2, 1);
    padding: 1.25rem;
}

.card__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

.card__close:hover {
    color: #fc4c02;
    background-color: rgba(252, 76, 2, 0.1);
}

.card__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fc4c02;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}

.card__value {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.1;
}

.card__comparison {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.card__comparison--positive {
    color: #16a34a;
}

.card__comparison--negative {
    color: #dc2626;
}

.card__comparison--neutral {
    color: #666;
}

.card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #999;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.card__sync-btn {
    padding: 0.25rem 0.5rem;
    background-color: #fc4c02;
    border: none;
    border-radius: 0.25rem;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
}

.card__sync-btn:hover {
    background-color: #e04400;
}

/* --------------------------------------------------------------------------
   Stat grid
   -------------------------------------------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

/* Add cards section */
.add-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #d0d0d0;
}

.add-cards__label {
    font-size: 0.875rem;
    color: #666;
}

.add-cards__btn {
    padding: 0.375rem 0.75rem;
    background-color: #fff;
    border: 1px dashed #fc4c02;
    border-radius: 0.25rem;
    color: #fc4c02;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
}

.add-cards__btn:hover {
    background-color: rgba(252, 76, 2, 0.1);
    border-style: solid;
}

/* --------------------------------------------------------------------------
   Sport stats
   -------------------------------------------------------------------------- */

.sport-stats {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sport-stats__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sport-stats__type {
    font-weight: 400;
    color: #1a1a1a;
}

.sport-stats__count {
    margin: 0;
    font-weight: 600;
    color: #666;
}

a.sport-stats__row--link {
    text-decoration: none;
    color: inherit;
    border-radius: 0.25rem;
    margin: -0.25rem -0.5rem;
    padding: 0.25rem 0.5rem;
}

a.sport-stats__row--link:hover {
    background-color: #f5f5f5;
}

/* Card links */
.card__link {
    color: inherit;
    text-decoration: none;
}

.card__link:hover {
    color: #fc4c02;
}

.card__link--small {
    color: inherit;
    text-decoration: none;
}

.card__link--small:hover {
    color: #fc4c02;
}

/* --------------------------------------------------------------------------
   Card sport checkboxes
   -------------------------------------------------------------------------- */

.card__sport-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.card__sport-check {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.375rem;
    background-color: #f5f5f5;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.75rem;
}

.card__sport-check:has(input:checked) {
    background-color: rgba(252, 76, 2, 0.1);
}

.card__sport-check input {
    accent-color: #fc4c02;
    margin: 0;
}

.card__sport-check span {
    user-select: none;
}

/* --------------------------------------------------------------------------
   Card filters
   -------------------------------------------------------------------------- */

.card__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.card__filter {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d0d0d0;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    background-color: #fff;
    cursor: pointer;
    min-width: 0;
}

.card__filter:focus {
    outline: none;
    border-color: #fc4c02;
}

.card__filter--number {
    width: 4rem;
    text-align: left;
}

/* Custom date range inputs */
.card__custom-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card__custom-dates--hidden {
    display: none;
}

.card__filter-label {
    font-size: 0.75rem;
    color: #666;
}

/* Wide card (spans full width) */
.card--wide {
    grid-column: 1 / -1;
}

/* --------------------------------------------------------------------------
   Yearly stats table
   -------------------------------------------------------------------------- */

.yearly-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.yearly-table th,
.yearly-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.yearly-table th {
    font-weight: 500;
    color: #666;
}

.yearly-table td {
    color: #1a1a1a;
}

.yearly-table tbody tr:last-child td {
    border-bottom: none;
}

.yearly-table td:not(:first-child),
.yearly-table th:not(:first-child) {
    text-align: right;
}

.yearly-table__link {
    color: inherit;
    text-decoration: none;
}

.yearly-table__link:hover {
    color: #fc4c02;
}

.yearly-table__header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.25rem;
}

.yearly-table__header:hover {
    color: #fc4c02;
}

.yearly-table__header::after {
    content: '';
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-top-color: #ccc;
    margin-top: 3px;
}

.yearly-table__header::before {
    content: '';
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-bottom-color: #ccc;
    margin-top: -5px;
}

.yearly-table__header--active::after,
.yearly-table__header--active::before {
    border-top-color: transparent;
    border-bottom-color: transparent;
}

.yearly-table__header--desc::after {
    border-top-color: #fc4c02;
}

.yearly-table__header--asc::before {
    border-bottom-color: #fc4c02;
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.page-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    width: 100%;
}

.page-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

.page-title__subtitle {
    font-size: 0.75rem;
    color: #666;
}

.page-title__subtitle a {
    color: inherit;
}

.page-title__subtitle a:hover {
    color: #fc4c02;
}

.page-title__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.page-title__logo:hover {
    text-decoration: none;
    color: inherit;
}

.page-title__logo .logo {
    height: 1.25rem;
    width: auto;
}

.logo__text {
    fill: #1a1a1a;
}

.logo__icon {
    fill: #fc4c02;
}


.page-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Page navigation */
.page-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-nav__form {
    display: inline;
}

.page-nav__link {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

.page-nav__link:hover {
    color: #fc4c02;
}

.page-nav__link--active {
    color: #fc4c02;
    font-weight: 600;
}

.page-nav__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background-color: #fc4c02;
    border: none;
    border-radius: 0.25rem;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

.page-nav__btn:hover {
    background-color: #e04400;
}

.page-nav__btn--secondary {
    background-color: #6b6b6b;
}

.page-nav__btn--secondary:hover {
    background-color: #555;
}

.page-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.page-nav__icon:hover {
    color: #fc4c02;
}

.page-nav__icon--active {
    color: #fc4c02;
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filters-row--hidden {
    display: none;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #fc4c02;
    color: #fff;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.filter-count {
    font-size: 0.875rem;
    color: #666;
    margin-left: 0.5rem;
}

/* --------------------------------------------------------------------------
   Activity list
   -------------------------------------------------------------------------- */

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-header__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

a.activity {
    text-decoration: none;
    color: inherit;
}

.activity {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.15s, transform 0.15s;
}

a.activity:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.activity__icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity__content {
    flex: 1;
    min-width: 0;
}

.activity__name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity__meta {
    font-size: 0.875rem;
    color: #666;
}

.activity__stats {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
}

.activity__stat {
    text-align: right;
}

.activity__stat-value {
    font-weight: 600;
}

.activity__stat-label {
    font-size: 0.75rem;
    color: #666;
}

/* Compact activity list */
.activity-list--compact {
    gap: 0.25rem;
}

.activity--compact {
    padding: 0.5rem 0.75rem;
    gap: 0.75rem;
}

.activity--compact .activity__icon {
    width: auto;
    height: auto;
    background: none;
    flex-shrink: 0;
    color: #666;
}

.activity--compact .activity__name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.activity--compact .activity__date {
    color: #666;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.activity__stats-inline {
    display: flex;
    gap: 0.75rem;
    color: #666;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.activity__stats-inline span {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .activity--compact {
        flex-wrap: wrap;
        padding: 0.5rem 0.625rem;
        gap: 0.25rem 0.5rem;
    }

    .activity--compact .activity__icon {
        order: 1;
    }

    .activity--compact .activity__name {
        order: 2;
        flex: 1;
    }

    .activity--compact .activity__date {
        order: 3;
        width: 100%;
        padding-left: 1.5rem;
    }

    .activity__stats-inline {
        order: 4;
        width: 100%;
        padding-left: 1.5rem;
        gap: 0.5rem;
    }
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d0d0d0;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
    text-align: left;
}

.form-input:focus {
    outline: none;
    border-color: #fc4c02;
    box-shadow: 0 0 0 3px rgba(252, 76, 2, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d0d0d0;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal {
    border: none;
    border-radius: 0.5rem;
    padding: 0;
    max-width: 24rem;
    width: calc(100% - 2rem);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal__content {
    display: flex;
    flex-direction: column;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
}

.modal__close:hover {
    color: #1a1a1a;
}

.modal__body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #fc4c02;
    cursor: pointer;
}

.checkbox input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox input[type="checkbox"]:disabled + span {
    color: #666;
}

/* --------------------------------------------------------------------------
   Login page
   -------------------------------------------------------------------------- */

.login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login__box {
    text-align: center;
    max-width: 24rem;
}

.login__title {
    margin-bottom: 0.5rem;
}

.login__title .logo {
    height: 2.5rem;
    width: auto;
}

.login__description {
    color: #666;
    margin-bottom: 1.5rem;
}

.login__support {
    margin-top: 2rem;
    font-size: 0.8125rem;
    color: #999;
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */

.spinner {
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Sport visibility
   -------------------------------------------------------------------------- */

.sport-visibility {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sport-visibility__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sport-visibility__badges--hidden {
    display: none;
}

.sport-visibility__badge {
    padding: 0.25rem 0.5rem;
    background-color: #fc4c02;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    color: #fff;
}

.sport-visibility__edit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sport-visibility__edit--hidden {
    display: none;
}

.sport-visibility__item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background-color: #f5f5f5;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8125rem;
}

.sport-visibility__item:has(input:checked) {
    background-color: rgba(252, 76, 2, 0.1);
}

.sport-visibility__item input {
    accent-color: #fc4c02;
}

.sport-visibility__item span {
    user-select: none;
}

.sport-visibility__action {
    padding: 0.25rem 0.5rem;
    background: none;
    border: none;
    color: #666;
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.sport-visibility__action:hover {
    color: #fc4c02;
}

.sport-visibility__toggle {
    padding: 0.25rem 0.5rem;
    background: none;
    border: none;
    color: #666;
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.sport-visibility__toggle:hover {
    color: #fc4c02;
}

.sport-visibility__save {
    padding: 0.25rem 0.75rem;
    background-color: #fc4c02;
    border: none;
    border-radius: 0.25rem;
    color: #fff;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-left: auto;
}

.sport-visibility__save:hover {
    background-color: #e04400;
}


/* --------------------------------------------------------------------------
   Settings
   -------------------------------------------------------------------------- */

.settings-form__help {
    font-size: 0.8125rem;
    color: #666;
    margin-bottom: 1rem;
}

.sport-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sport-checkbox {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: #f5f5f5;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.sport-checkbox:has(input:checked) {
    background-color: rgba(252, 76, 2, 0.1);
}

.sport-checkbox input {
    accent-color: #fc4c02;
}

.sport-checkbox__label {
    user-select: none;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-row input {
    accent-color: #fc4c02;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.alert--success {
    background-color: #dcfce7;
    color: #166534;
}

/* --------------------------------------------------------------------------
   Progress bar
   -------------------------------------------------------------------------- */

.progress {
    background-color: #e0e0e0;
    border-radius: 0.25rem;
    height: 0.5rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress__bar {
    background-color: #fc4c02;
    height: 100%;
    transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   Sync status
   -------------------------------------------------------------------------- */

.sync-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sync-status__info {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0;
}

.sync-progress__info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

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

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
}

.pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid #d0d0d0;
    border-radius: 0.25rem;
    background-color: #fff;
    color: #1a1a1a;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s;
}

a.pagination__item:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.pagination__item--active {
    background-color: #fc4c02;
    border-color: #fc4c02;
    color: #fff;
    font-weight: 500;
}

.pagination__item--disabled {
    color: #999;
    cursor: not-allowed;
}

.pagination__item--ellipsis {
    border: none;
    background: none;
    min-width: auto;
    padding: 0 0.25rem;
}

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */

.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.admin-login__box {
    width: 100%;
    max-width: 20rem;
}

.admin-login__title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-page {
    max-width: 40rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-title {
    font-size: 1.25rem;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-logout-form {
    display: inline;
}

.admin-help {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.admin-cards {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 0.375rem;
    cursor: grab;
}

.admin-card:active {
    cursor: grabbing;
}

.admin-card--dragging {
    opacity: 0.5;
    background-color: #f5f5f5;
}

.admin-card__handle {
    color: #999;
    font-size: 1rem;
    user-select: none;
}

.admin-card__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    cursor: pointer;
}

.admin-card__label input {
    accent-color: #fc4c02;
}

.admin-card__name {
    font-weight: 500;
}

.admin-card__required {
    color: #999;
    font-size: 0.75rem;
}

.admin-form-actions {
    display: flex;
    gap: 0.5rem;
}

.alert--error {
    background-color: #fee2e2;
    color: #991b1b;
}
