/*
Theme Name:  Twenty Seventeen Child
Template:    twentyseventeen
Description: Child theme for Twenty Seventeen
Version:     1.0
*/

/* =============================================
   AP PROVIDER LISTINGS
   ============================================= */
.ap-listing {
    margin: 2rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.ap-listing__section {
    background: #f9f9f9;
    border-left: 4px solid #005a9c;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0 4px 4px 0;
}

.ap-listing__section h3 {
    margin-top: 0;
    color: #005a9c;
    font-size: 1.1rem;
}

.ap-listing__restricted {
    background: #fff8e1;
    border: 2px dashed #f0a500;
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.ap-listing__restricted h3 {
    margin-top: 0;
    color: #333;
}

.ap-btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin: 0.4rem;
    font-size: 0.95rem;
}

.ap-btn--primary {
    background: #005a9c;
    color: #fff;
}

.ap-btn--primary:hover {
    background: #004478;
    color: #fff;
}

.ap-btn--secondary {
    background: #fff;
    color: #005a9c;
    border: 2px solid #005a9c;
}

.ap-btn--secondary:hover {
    background: #f0f0f0;
}

.ap-btn--edit {
    background: #2e7d32;
    color: #fff;
}

.ap-btn--edit:hover {
    background: #1b5e20;
    color: #fff;
}
/* =============================================
   AP DIRECTORY PAGE
   ============================================= */

/* Search bar */
.ap-directory__search {
    margin-bottom: 1.5rem;
}

.ap-directory__search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.ap-directory__search-input {
    flex: 1;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.ap-directory__search-input:focus {
    border-color: #005a9c;
}

.ap-directory__search-btn {
    white-space: nowrap;
}

/* Filters */
.ap-directory__filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.ap-directory__filter-select {
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    min-width: 180px;
}

.ap-directory__filter-select:focus {
    border-color: #005a9c;
    outline: none;
}

/* Autocomplete */
.ap-directory__autocomplete {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 80px;
    background: #fff;
    border: 2px solid #005a9c;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ap-autocomplete__item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
}

.ap-autocomplete__item:hover,
.ap-autocomplete__item--active {
    background: #f0f6ff;
    color: #005a9c;
}

/* Results header */
.ap-directory__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.ap-directory__count {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* View toggle */
.ap-directory__view-toggle {
    display: flex;
    gap: 0.4rem;
}

.ap-view-btn {
    display: inline-block;
    padding: 0.4rem 0.65rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    font-size: 1rem;
    line-height: 1;
}

.ap-view-btn.active,
.ap-view-btn:hover {
    border-color: #005a9c;
    color: #005a9c;
    background: #f0f6ff;
}

/* Grid view */
.ap-directory__results--grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* List view */
.ap-directory__results--list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* Cards — shared */
.ap-card__inner {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    padding: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ap-card__inner:hover {
    border-color: #005a9c;
    box-shadow: 0 4px 12px rgba(0,90,156,0.1);
    color: inherit;
}

.ap-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.ap-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #005a9c;
    line-height: 1.3;
}

.ap-card__lock {
    font-size: 1rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Badges */
.ap-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.ap-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.ap-badge--sector {
    background: #e8f0fb;
    color: #005a9c;
}

.ap-badge--outstanding {
    background: #e8f5e9;
    color: #2e7d32;
}

.ap-badge--good {
    background: #e3f2fd;
    color: #1565c0;
}

.ap-badge--ri {
    background: #fff8e1;
    color: #f57f17;
}

.ap-badge--inadequate {
    background: #fce4ec;
    color: #c62828;
}

/* Location */
.ap-card__location {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ap-card__la {
    background: #f5f5f5;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

/* Description (list view only) */
.ap-card__description {
    font-size: 0.9rem;
    color: #555;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.ap-card__age {
    font-size: 0.88rem;
    color: #555;
    margin: 0.25rem 0;
}

/* CTA */
.ap-card__cta {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #005a9c;
}

/* List view card overrides */
.ap-card--list .ap-card__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    gap: 0 1rem;
    align-items: start;
}

.ap-card--list .ap-card__header {
    grid-column: 1;
    margin-bottom: 0.4rem;
}

.ap-card--list .ap-card__meta {
    grid-column: 1;
    margin-bottom: 0.4rem;
}

.ap-card--list .ap-card__location {
    grid-column: 1;
}

.ap-card--list .ap-card__description {
    grid-column: 1 / -1;
}

.ap-card--list .ap-card__cta {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    white-space: nowrap;
}

/* Pagination */
.ap-directory__pagination {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.ap-page-btn {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
}

.ap-page-btn.active,
.ap-page-btn:hover {
    border-color: #005a9c;
    background: #005a9c;
    color: #fff;
}

/* No results */
.ap-directory__no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

/* Mobile responsive */
@media ( max-width: 600px ) {
    .ap-directory__search-bar {
        flex-direction: column;
    }

    .ap-directory__filters {
        flex-direction: column;
    }

    .ap-directory__filter-select {
        width: 100%;
    }

    .ap-directory__results--grid {
        grid-template-columns: 1fr;
    }

    .ap-card--list .ap-card__inner {
        grid-template-columns: 1fr;
    }

    .ap-card--list .ap-card__cta {
        grid-column: 1;
        grid-row: auto;
    }
}
/* =============================================
   AP PROVIDER MAP
   ============================================= */
.ap-provider-map {
    width: 100%;
    height: 350px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    background: #f0f0f0;
}

.ap-map__postcode {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

@media ( max-width: 600px ) {
    .ap-provider-map {
        height: 250px;
    }
}
/* =============================================
   AP EDIT LISTING FORM
   ============================================= */
.ap-edit-listing {
    max-width: 760px;
    margin: 0 auto;
}

.ap-edit-listing h2 {
    color: #005a9c;
    margin-bottom: 0.5rem;
}

.ap-edit-listing__intro {
    color: #555;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.ap-edit-listing__success {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
    padding: 1rem 1.25rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1.5rem;
    color: #2e7d32;
    font-weight: 600;
}

.ap-edit-listing__success a {
    color: #2e7d32;
    margin-left: 1rem;
}

.ap-edit-listing__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ap-edit-listing__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ap-edit-listing__field label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ap-edit-listing__hint {
    font-size: 0.85rem;
    color: #777;
    font-weight: normal;
}

.ap-edit-listing__input,
.ap-edit-listing__select {
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    width: 100%;
    background: #fff;
}

.ap-edit-listing__input:focus,
.ap-edit-listing__select:focus,
.ap-edit-listing__textarea:focus {
    border-color: #005a9c;
    outline: none;
}

.ap-edit-listing__textarea {
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    width: 100%;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.ap-edit-listing__actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
    flex-wrap: wrap;
}

.ap-btn--large {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

@media ( max-width: 600px ) {
    .ap-edit-listing__actions {
        flex-direction: column;
    }

    .ap-btn--large {
        width: 100%;
        text-align: center;
    }
}
/* =============================================
   AP MANAGE USERS
   ============================================= */
.ap-manage-users {
    max-width: 760px;
    margin: 0 auto;
}

.ap-manage-users h2 {
    color: #005a9c;
    margin-bottom: 0.5rem;
}

.ap-manage-users__section {
    background: #f9f9f9;
    border-left: 4px solid #005a9c;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0 4px 4px 0;
}

.ap-manage-users__section h3 {
    margin-top: 0;
    color: #005a9c;
    font-size: 1.1rem;
}

.ap-manage-users__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ap-manage-users__table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: #e8f0fb;
    color: #005a9c;
    font-weight: 600;
    border-bottom: 2px solid #005a9c;
}

.ap-manage-users__table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.ap-manage-users__table tr:last-child td {
    border-bottom: none;
}

.ap-manage-users__table tr:hover td {
    background: #f0f6ff;
}

.ap-manage-users__you {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
}

.ap-manage-users__error {
    background: #fce4ec;
    border-left: 4px solid #c62828;
    padding: 1rem 1.25rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1.5rem;
    color: #c62828;
    font-weight: 600;
}

.ap-manage-users__add-form {
    margin-top: 0.75rem;
}

.ap-manage-users__add-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.ap-manage-users__add-row .ap-edit-listing__input {
    flex: 1;
    min-width: 200px;
}

.ap-btn--remove {
    background: #fff;
    color: #c62828;
    border: 2px solid #c62828;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
}

.ap-btn--remove:hover {
    background: #c62828;
    color: #fff;
}

@media ( max-width: 600px ) {
    .ap-manage-users__table {
        font-size: 0.85rem;
    }

    .ap-manage-users__table th,
    .ap-manage-users__table td {
        padding: 0.5rem;
    }

    .ap-manage-users__add-row {
        flex-direction: column;
        align-items: stretch;
    }
}
.ap-edit-listing__quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
}
/* =============================================
   AP CLAIM LISTING PAGE
   ============================================= */
.ap-claim-listing {
    max-width: 760px;
    margin: 0 auto;
}

.ap-claim-listing h2 {
    color: #005a9c;
    margin-bottom: 0.5rem;
}

.ap-claim-listing__section {
    background: #f9f9f9;
    border-left: 4px solid #005a9c;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0 4px 4px 0;
}

.ap-claim-listing__section h3 {
    margin-top: 0;
    color: #005a9c;
    font-size: 1.1rem;
}

.ap-claim-listing__section--alt {
    border-left-color: #f0a500;
    background: #fff8e1;
}

.ap-claim-listing__match {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.ap-claim-listing__match--claimed {
    border-color: #ddd;
    background: #fafafa;
    opacity: 0.8;
}

.ap-claim-listing__match-details {
    flex: 1;
}

.ap-claim-listing__match-details h4 {
    margin: 0 0 0.4rem;
    color: #005a9c;
    font-size: 1rem;
}

.ap-claim-listing__match-details p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.ap-claim-listing__claimed-notice {
    color: #f57f17;
    font-size: 0.88rem;
    margin-top: 0.5rem;
}

.ap-claim-listing__match-form {
    min-width: 220px;
}

.ap-claim-listing__field {
    margin-bottom: 0.75rem;
}

.ap-claim-listing__field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.ap-claim-listing__confirm-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #444;
    cursor: pointer;
    line-height: 1.4;
}

.ap-claim-listing__confirm-label input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.ap-claim-listing__search-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ap-claim-listing__search-row .ap-edit-listing__input {
    flex: 1;
    min-width: 200px;
}

.ap-claim-listing__search-results {
    margin-top: 0.75rem;
}

.ap-claim-listing__new-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Unverified badge */
.ap-unverified-badge {
    display: inline-block;
    background: #fff8e1;
    color: #f57f17;
    border: 2px solid #f0a500;
    padding: 0.3rem 0.85rem;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.ap-badge--unverified {
    background: #fff8e1;
    color: #f57f17;
}

@media ( max-width: 600px ) {
    .ap-claim-listing__match {
        flex-direction: column;
    }

    .ap-claim-listing__match-form {
        width: 100%;
    }

    .ap-claim-listing__search-row {
        flex-direction: column;
    }
}
/* =============================================
   AP MEMBERSHIP LEVELS PAGE
   ============================================= */
.ap-levels {
    max-width: 900px;
    margin: 0 auto;
}

.ap-levels__intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    text-align: center;
}

.ap-levels__group {
    margin-bottom: 2.5rem;
}

.ap-levels__group-header {
    padding: 1.25rem 1.5rem;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}

.ap-levels__group-header h2 {
    margin: 0 0 0.4rem;
    font-size: 1.3rem;
    color: #fff;
}

.ap-levels__group-header p {
    margin: 0;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ap-levels__group-header--provider {
    background: #005a9c;
}

.ap-levels__group-header--la {
    background: #2e7d32;
}

.ap-levels__group-header--visitor {
    background: #6a1b9a;
}

.ap-levels__cards {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
    gap: 0;
    border: 2px solid #e8e8e8;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.ap-level-card {
    padding: 1.5rem;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #fff;
}

.ap-level-card:last-child {
    border-right: none;
}

.ap-level-card--current {
    background: #f0f6ff;
}

.ap-level-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ap-level-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.3;
}

.ap-level-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.ap-level-card__amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: #005a9c;
    line-height: 1;
}

.ap-level-card__period {
    font-size: 0.85rem;
    color: #777;
}

.ap-level-card__description {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    flex: 1;
    margin: 0;
}

.ap-btn--full {
    display: block;
    text-align: center;
    width: 100%;
}

.ap-btn--current {
    display: block;
    text-align: center;
    background: #e8f0fb;
    color: #005a9c;
    padding: 0.65rem 1.4rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Provider group colours — blue (3rd child due to intro paragraph) */
.ap-levels__group:nth-child(2) .ap-level-card__amount {
    color: #005a9c !important;
}

.ap-levels__group:nth-child(2) .ap-btn--primary {
    background: #005a9c !important;
    border-color: #005a9c !important;
}

.ap-levels__group:nth-child(2) .ap-btn--primary:hover {
    background: #004080 !important;
    border-color: #004080 !important;
}

.ap-levels__group:nth-child(2) .ap-level-card--current {
    background: #e8f0fb;
}

/* LA group colours — green */
.ap-levels__group:nth-child(3) .ap-level-card__amount {
    color: #2e7d32 !important;
}

.ap-levels__group:nth-child(3) .ap-btn--primary {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
}

.ap-levels__group:nth-child(3) .ap-btn--primary:hover {
    background: #1b5e20 !important;
    border-color: #1b5e20 !important;
}

.ap-levels__group:nth-child(3) .ap-level-card--current {
    background: #e8f5e9;
}

/* Visitor group colours — purple */
.ap-levels__group:nth-child(4) .ap-level-card__amount {
    color: #6a1b9a !important;
}

.ap-levels__group:nth-child(4) .ap-btn--primary {
    background: #6a1b9a !important;
    border-color: #6a1b9a !important;
}

.ap-levels__group:nth-child(4) .ap-btn--primary:hover {
    background: #4a148c !important;
    border-color: #4a148c !important;
}

.ap-levels__group:nth-child(4) .ap-level-card--current {
    background: #f3e5f5;
}
@media ( max-width: 600px ) {
    .ap-levels__cards {
        grid-template-columns: 1fr;
    }

    .ap-level-card {
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }

    .ap-level-card:last-child {
        border-bottom: none;
    }
}
.ap-levels__group {
    margin-bottom: 3.5rem;
    padding-bottom: 3.5rem;
    border-bottom: 2px solid #e8e8e8;
}

.ap-levels__group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* =============================================
   AP ACCOUNT PAGE LINKS
   ============================================= */
.ap-account-links {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.ap-account-links h3 {
    color: #005a9c;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.ap-account-links ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.ap-account-links ul li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.ap-account-links ul li:last-child {
    border-bottom: none;
}

.ap-account-links ul li a {
    color: #005a9c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.ap-account-links ul li a:hover {
    text-decoration: underline;
}
/* =============================================
   AP MEMBERS AREA
   ============================================= */
.ap-members-area {
    max-width: 760px;
    margin: 0 auto;
}

.ap-members-area h2 {
    color: #005a9c;
    margin-bottom: 1.5rem;
}

.ap-members-area__section {
    background: #f9f9f9;
    border-left: 4px solid #005a9c;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0 4px 4px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.ap-members-area__section h3 {
    margin: 0;
    color: #005a9c;
    font-size: 1rem;
    width: 100%;
}
/* =============================================
   AP SUBMIT LISTING FORM
   ============================================= */
.ap-submit-listing {
    max-width: 760px;
    margin: 0 auto;
}

.ap-submit-listing__upgrade {
    background: #fff8e1;
    border-left: 4px solid #f0a500;
    padding: 1rem 1.25rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.ap-submit-listing__upgrade p {
    margin: 0;
}

.ap-submit-listing__upgrade a {
    color: #f0a500;
    font-weight: 600;
}

.ap-field--error .ap-edit-listing__input,
.ap-field--error .ap-edit-listing__select {
    border-color: #c62828;
}

.ap-field__error {
    display: block;
    color: #c62828;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}
/* Force white text on primary buttons in all contexts */
.ap-btn--primary,
.ap-btn--primary:visited,
.ap-btn--primary:hover {
    color: #fff !important;
}
/* =============================================
   AP STAFF DASHBOARD
   ============================================= */
.ap-staff-dashboard {
    max-width: 1100px;
    margin: 0 auto;
}

/* Stats row */
.ap-staff-dashboard__stats {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
    gap: 1rem;
    margin-bottom: 2rem;
}

.ap-stat-card {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ap-stat-card--alert {
    border-color: #f0a500;
    background: #fff8e1;
}

.ap-stat-card__number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #005a9c;
    line-height: 1;
}

.ap-stat-card--alert .ap-stat-card__number {
    color: #f57f17;
}

.ap-stat-card__label {
    font-size: 0.88rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sections */
.ap-staff-dashboard__section {
    background: #f9f9f9;
    border-left: 4px solid #005a9c;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0 4px 4px 0;
}

.ap-staff-dashboard__section h3 {
    margin-top: 0;
    color: #005a9c;
    font-size: 1.1rem;
}

.ap-staff-dashboard__section h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.ap-staff-dashboard__section--alert {
    border-left-color: #c62828;
    background: #fce4ec;
}

.ap-staff-dashboard__section--alert h3 {
    color: #c62828;
}

.ap-staff-dashboard__section--warning {
    border-left-color: #f0a500;
    background: #fff8e1;
}

.ap-staff-dashboard__section--warning h3 {
    color: #f57f17;
}

/* Quick links */
.ap-staff-dashboard__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Table */
.ap-staff-dashboard__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.ap-staff-dashboard__table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: rgba(0,0,0,0.05);
    font-weight: 600;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.ap-staff-dashboard__table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    vertical-align: middle;
}

.ap-staff-dashboard__table tr:last-child td {
    border-bottom: none;
}

.ap-staff-dashboard__table tr:hover td {
    background: rgba(0,0,0,0.02);
}

.ap-staff-dashboard__table a {
    color: #005a9c;
    text-decoration: none;
    font-weight: 600;
}

.ap-staff-dashboard__table a:hover {
    text-decoration: underline;
}

/* Small buttons */
.ap-btn--small {
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    margin: 0.15rem;
}

@media ( max-width: 600px ) {
    .ap-staff-dashboard__stats {
        grid-template-columns: repeat( 2, 1fr );
    }

    .ap-staff-dashboard__table {
        font-size: 0.8rem;
    }

    .ap-staff-dashboard__table th,
    .ap-staff-dashboard__table td {
        padding: 0.4rem 0.5rem;
    }
}
/* =============================================
   AP FAQ PAGE
   ============================================= */
.ap-faqs {
    max-width: 800px;
    margin: 0 auto;
}

.ap-faqs__intro {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.ap-faqs__section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.ap-faqs__section:last-of-type {
    border-bottom: none;
}

.ap-faqs__section-title {
    color: #005a9c;
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ap-faqs__items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ap-faq-item {
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

.ap-faq-item__question {
    width: 100%;
    text-align: left;
    background: #fff;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    line-height: 1.4;
    transition: background 0.2s;
}

.ap-faq-item__question:hover {
    background: #f0f6ff;
    color: #005a9c;
}

.ap-faq-item__question[aria-expanded="true"] {
    background: #005a9c;
    color: #fff;
}

.ap-faq-item__icon {
    font-size: 1.25rem;
    font-weight: 400;
    flex-shrink: 0;
    line-height: 1;
}

.ap-faq-item__answer {
    padding: 1rem 1.25rem;
    background: #f9f9f9;
    border-top: 2px solid #e8e8e8;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

.ap-faq-item__answer p {
    margin: 0;
}

.ap-faq-item__answer a {
    color: #005a9c;
    font-weight: 600;
}

/* CTA section */
.ap-faqs__cta {
    background: #f0f6ff;
    border: 2px solid #005a9c;
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.ap-faqs__cta h3 {
    color: #005a9c;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.ap-faqs__cta p {
    color: #555;
    margin-bottom: 1.25rem;
}

@media ( max-width: 600px ) {
    .ap-faq-item__question {
        font-size: 0.88rem;
        padding: 0.85rem 1rem;
    }

    .ap-faq-item__answer {
        padding: 0.85rem 1rem;
        font-size: 0.88rem;
    }
}
/* =============================================
   AP OFSTED INSPECTION
   ============================================= */

/* Overall rating badges */
.ap-ofsted-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ap-ofsted-badge--outstanding {
    background: #e8f5e9;
    color: #2e7d32;
}

.ap-ofsted-badge--good {
    background: #e3f2fd;
    color: #1565c0;
}

.ap-ofsted-badge--requires-improvement {
    background: #fff8e1;
    color: #f57f17;
}

.ap-ofsted-badge--inadequate {
    background: #fce4ec;
    color: #c62828;
}

.ap-ofsted-badge--not-yet-inspected,
.ap-ofsted-badge--exempt {
    background: #f5f5f5;
    color: #666;
}

.ap-ofsted-badge--met {
    background: #e8f5e9;
    color: #2e7d32;
}

.ap-ofsted-badge--not-met {
    background: #fce4ec;
    color: #c62828;
}

/* Graded areas table */
.ap-ofsted-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.ap-ofsted-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: #e8f0fb;
    color: #005a9c;
    font-weight: 600;
    border-bottom: 2px solid #005a9c;
}

.ap-ofsted-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.ap-ofsted-table tr:last-child td {
    border-bottom: none;
}

/* Grade badges */
.ap-ofsted-grade {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.ap-ofsted-grade--exceptional {
    background: #e3f2fd;
    color: #1565c0;
}

.ap-ofsted-grade--strong {
    background: #c8e6c9;
    color: #1b5e20;
}

.ap-ofsted-grade--expected-standard {
    background: #69f0ae;
    color: #2e7d32;
}

.ap-ofsted-grade--needs-attention {
    background: #fff3e0;
    color: #e65100;
}

.ap-ofsted-grade--urgent-improvement {
    background: #fce4ec;
    color: #c62828;
}
/* Edit table */
.ap-ofsted-edit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.ap-ofsted-edit-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: #f0f6ff;
    color: #005a9c;
    font-weight: 600;
    border-bottom: 2px solid #005a9c;
}

.ap-ofsted-edit-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.ap-ofsted-edit-table tr:last-child td {
    border-bottom: none;
}

.ap-ofsted-edit-table .ap-edit-listing__select {
    width: 100%;
}

@media ( max-width: 600px ) {
    .ap-ofsted-table,
    .ap-ofsted-edit-table {
        font-size: 0.82rem;
    }

    .ap-ofsted-table th,
    .ap-ofsted-table td,
    .ap-ofsted-edit-table th,
    .ap-ofsted-edit-table td {
        padding: 0.4rem 0.5rem;
    }
}
/* =============================================
   AP LISTING TWO COLUMN TOP GRID
   ============================================= */
.ap-listing__top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.ap-listing__top-grid .ap-listing__section {
    margin-bottom: 0;
}

.ap-listing__contacts-column {
    border-left-color: #2e7d32;
}

.ap-listing__contacts-column h3 {
    color: #2e7d32;
}

.ap-listing__contacts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Contact cards */
.ap-contact-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ap-contact-card__info p {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ap-contact-card__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.ap-contact-card__job {
    color: #666;
    font-style: italic;
}

.ap-contact-card__phone,
.ap-contact-card__email {
    font-size: 0.88rem !important;
    color: #444;
}

.ap-contact-card__email a {
    color: #005a9c;
}

.ap-contact-card__actions {
    margin-top: 0.25rem;
}

/* If no contacts — contact details takes full width */
.ap-listing__top-grid .ap-listing__section:only-child {
    grid-column: 1 / -1;
}

@media ( max-width: 700px ) {
    .ap-listing__top-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   AP DOCUMENT LIBRARY CARDS
   ============================================= */

/* Grid layout */
.ap-library__results--grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
    gap: 1.25rem;
    margin-top: 1.25rem;
}

/* List layout */
.ap-library__results--list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

/* Document card */
.ap-doc-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.ap-doc-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* List view card */
.ap-doc-card--list {
    flex-direction: row;
    align-items: stretch;
}

/* Type badge — shaded title bar */
.ap-doc-card__type-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ap-doc-card--list .ap-doc-card__type-badge {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 80px;
    padding: 1rem 0.75rem;
    gap: 0.25rem;
    text-align: center;
}

.ap-doc-type--pdf {
    background: #fce4ec;
    color: #c62828;
}

.ap-doc-type--word {
    background: #e3f2fd;
    color: #1565c0;
}

.ap-doc-type--excel {
    background: #e8f5e9;
    color: #2e7d32;
}

.ap-doc-type--ppt {
    background: #fff3e0;
    color: #e65100;
}

.ap-doc-type--video {
    background: #f3e5f5;
    color: #6a1b9a;
}

.ap-doc-type--audio {
    background: #e0f7fa;
    color: #00695c;
}

.ap-doc-type--image {
    background: #fff8e1;
    color: #f57f17;
}

.ap-doc-type--other {
    background: #f5f5f5;
    color: #555;
}

.ap-doc-card__type-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.ap-doc-card__type-label {
    font-size: 0.75rem;
}

/* Card content */
.ap-doc-card__content {
    padding: 0.85rem 1rem;
    flex: 1;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ap-doc-card--list .ap-doc-card__content {
    border-top: none;
    border-left: 1px solid #f0f0f0;
}

.ap-doc-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.ap-doc-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.3;
}

.ap-doc-card__description {
    font-size: 0.88rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.ap-doc-card__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.2rem;
}

.ap-doc-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.25rem;
}

.ap-doc-card__meta-item {
    font-size: 0.8rem;
    color: #888;
}

.ap-doc-card__external {
    color: #005a9c;
    font-weight: 600;
}

/* Actions bar */
.ap-doc-card__actions {
    padding: 0.65rem 1rem;
    background: #f9f9f9;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ap-doc-card--list .ap-doc-card__actions {
    border-top: none;
    border-left: 1px solid #f0f0f0;
    flex-direction: column;
    justify-content: center;
    min-width: 140px;
    padding: 0.65rem 0.85rem;
}

/* Audience badges */
.ap-doc-audience-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ap-doc-audience--free {
    background: #e8f5e9;
    color: #2e7d32;
}

.ap-doc-audience--members {
    background: #e3f2fd;
    color: #1565c0;
}

.ap-doc-audience--providers {
    background: #e8f0fb;
    color: #005a9c;
}

.ap-doc-audience--la {
    background: #f3e5f5;
    color: #6a1b9a;
}

.ap-doc-audience--schools {
    background: #fff3e0;
    color: #e65100;
}

/* Rating buttons */
.ap-doc-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.ap-doc-card--list .ap-doc-rating {
    margin-left: 0;
    margin-top: 0.25rem;
}

.ap-doc-rating__btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.82rem;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ap-doc-rating__btn:hover {
    border-color: #005a9c;
    color: #005a9c;
}

.ap-doc-rating__btn--active {
    background: #005a9c;
    border-color: #005a9c;
    color: #fff;
}

.ap-doc-card__no-file {
    font-size: 0.82rem;
    color: #999;
    font-style: italic;
}

/* Submit document form */
.ap-submit-document__file-options {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ap-submit-document__divider {
    text-align: center;
    margin: 1rem 0;
    position: relative;
    color: #999;
    font-size: 0.88rem;
    font-weight: 600;
}

.ap-submit-document__divider::before,
.ap-submit-document__divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.ap-submit-document__divider::before { left: 0; }
.ap-submit-document__divider::after  { right: 0; }

.ap-submit-document__file-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Library header */
.ap-library__header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media ( max-width: 600px ) {
    .ap-library__results--grid {
        grid-template-columns: 1fr;
    }

    .ap-doc-card--list {
        flex-direction: column;
    }

    .ap-doc-card--list .ap-doc-card__actions {
        border-left: none;
        border-top: 1px solid #f0f0f0;
        flex-direction: row;
        min-width: auto;
    }

    .ap-doc-rating {
        margin-left: 0;
    }
}
/* =============================================
   PAGINATION UPDATES
   ============================================= */
.ap-directory__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.ap-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #005a9c;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}

.ap-page-btn:hover {
    background: #005a9c;
    border-color: #005a9c;
    color: #fff;
}

.ap-page-btn.active {
    background: #005a9c;
    border-color: #005a9c;
    color: #fff;
    pointer-events: none;
}

.ap-page-btn--dots {
    border: none;
    background: none;
    color: #999;
    pointer-events: none;
    min-width: 24px;
}

.ap-directory__page-info {
    font-size: 0.85rem;
    color: #888;
    margin-left: 0.5rem;
}
/* =============================================
   DIRECTORY SEARCH BOX & HEADER UPDATES
   ============================================= */
.ap-directory__search-box {
    background: #f0f6ff;
    border: 2px solid #005a9c;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ap-directory__header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ap-directory__sort-form {
    display: flex;
    align-items: center;
}

.ap-directory__sort-select {
    margin: 0;
}

@media ( max-width: 600px ) {
    .ap-directory__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .ap-directory__header-right {
        width: 100%;
        justify-content: space-between;
    }
}
/* =============================================
   STAFF DASHBOARD COLLAPSIBLE SECTIONS
   ============================================= */
.ap-staff-collapsible__heading {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    user-select: none;
}

.ap-staff-collapsible__heading:hover {
    color: #c0626a;
}

.ap-staff-collapsible__icon {
    font-size: 1.25rem;
    font-weight: 400;
    flex-shrink: 0;
    color: #005a9c;
}

.ap-staff-collapsible__body {
    margin-top: 1rem;
}

