/* === Blog Sort Toggle - Upload vs Modified (Centered Toggle) === */

/* Force the toggle form to center within Astra's container */
.ast-container form.photo-sort-toggle {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* Wrapper form */
.photo-sort-toggle {
    display: flex;
    flex-direction: column;      /* label on its own line */
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin: 1rem auto 1.5rem auto;   /* space above/below and center */
    width: 100%;
    font-family: inherit;
}

/* "Sort by:" label */
.photo-sort-toggle .toggle-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    font-weight: 600;
    margin-bottom: 0.15rem;
    text-align: center;
    color: #444;
}

/* The pill toggle container */
.photo-sort-toggle .toggle-group {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    overflow: hidden;
}

/* Each half of the toggle */
.photo-sort-toggle .toggle-option {
    appearance: none;
    border: none;
    padding: 0.4rem 1.3rem;
    background: transparent;
    cursor: pointer;

    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
    white-space: nowrap;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: background 0.15s ease, color 0.15s ease;
}

/* Hover state */
.photo-sort-toggle .toggle-option:hover {
    background: #f4f4f4;
}

/* Active (selected) side of the toggle */
.photo-sort-toggle .toggle-option.active {
    background: #000;
    color: #fff;
    box-shadow: inset 0 0 0 1px #000;
}

/* Remove weird theme button inheritance */
.photo-sort-toggle .toggle-option:focus,
.photo-sort-toggle .toggle-option:visited {
    box-shadow: none;
    outline: none;
    text-decoration: none;
}