/* Member dashboard (website-review-my-reports) */

.wr-dash-main {
    padding: 6rem 0;
    min-height: 50vh;
    background: #f6f7f9;
}

.wr-dash-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem 1.25rem;
    margin: 0 0 1.25rem;
}

.wr-dash-page-header__title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    flex: 0 1 auto;
    min-width: 0;
}

.wr-dash-page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

.wr-dash-layout {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.wr-dash-layout__main {
    gap: 1rem;
    display: flex;
    flex-direction: column;
}

/* Mobile: show saved reports first, profile details second */
@media (max-width: 899px) {
    .wr-dash-layout__main {
        order: 1;
    }

    .wr-dash-layout__aside {
        order: 2;
    }
}

@media (min-width: 900px) {
    .wr-dash-layout {
        grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    }

    .wr-dash-layout__aside {
        position: sticky;
        top: 1rem;
    }
}

.wr-dash-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wr-dash-card h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
}

.wr-dash-form .field {
    margin-bottom: 1rem;
}

.wr-dash-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.wr-dash-form .wr-dash-field__row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 36rem;
}

.wr-dash-form .wr-dash-field__input {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 32rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

/* Saved values: read-only presentation (not a “form box”) until user chooses Edit */
.wr-dash-field--has-value:not(.wr-dash-field--editing) .wr-dash-field__input {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
    color: #111827;
    cursor: text;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wr-dash-field--editing .wr-dash-field__input {
    white-space: normal;
}

.wr-dash-field--empty .wr-dash-field__edit {
    display: none;
}

.wr-dash-field__edit {
    flex-shrink: 0;
}

.wr-dash-form input[type="text"]:not(.wr-dash-field__input),
.wr-dash-form input[type="email"]:not(.wr-dash-field__input),
.wr-dash-form input[type="tel"]:not(.wr-dash-field__input),
.wr-dash-form input[type="url"]:not(.wr-dash-field__input) {
    width: calc(100% - 40px);
    max-width: 32rem;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: .9rem;

    margin-left: -10px;
    border-bottom: 1px solid #eee;
    border-radius: 0;

}

.wr-dash-form input:focus { 
    border: 1px solid #d1d5db;
    border-radius: 4px;
    outline: none;
}

.wr-dash-form .hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Reports list: div rows; identical column template per row; subgrid aligns tracks across rows when supported */
.wr-dash-reports {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.wr-dash-reports__grid {
    /* First column grows; others size to label / cell content (max-content). */
    --wr-dash-reports-cols:
        minmax(0, 1fr)
        max-content
        max-content
        max-content
        max-content
        max-content;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
    font-size: 0.95rem;
}

.wr-dash-reports__tbody {
    display: contents;
}

.wr-dash-reports__row {
    display: grid;
    grid-template-columns: var(--wr-dash-reports-cols);
    gap: 0.5rem 0.75rem;
    align-items: start;
    padding: 0.35rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.wr-dash-reports__row--head {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.wr-dash-reports__row--head .wr-dash-reports__cell {
    padding: 0.5rem 0.35rem 0.55rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    border-bottom: none;
}

.wr-dash-reports__cell {
    padding: 0.65rem 0.35rem;
    text-align: left;
    min-width: 0;
}

.wr-dash-reports__row:not(.wr-dash-reports__row--head) .wr-dash-reports__cell {
    border-bottom: none;
}

.wr-dash-reports__cell--stat {
    white-space: nowrap;
    color: #374151;
}

.wr-dash-reports__cell--actions {
    white-space: nowrap;
    text-align: center;
}

.wr-dash-reports__cell--actions .wr-dash-delete-report {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0.35rem;
}

.wr-dash-reports__title-link {
    color: inherit;
    text-decoration: underline;
    color: var(--color-primary-600);
}

.wr-dash-reports__title-link:hover,
.wr-dash-reports__title-link:focus-visible {
    text-decoration: none;
}

.wr-dash-reports__title-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

.wr-dash-reports__meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.wr-dash-reports__cell--edit {
    text-align: center;
    white-space: nowrap;
}

.wr-dash-reports__cell--edit .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0.35rem;
    text-decoration: none;
}

@supports (grid-template-columns: subgrid) {
    .wr-dash-reports__grid {
        display: grid;
        grid-template-columns: var(--wr-dash-reports-cols);
        gap: 0.5rem 0.75rem;
        align-items: start;
    }

    .wr-dash-reports__row {
        grid-template-columns: subgrid;
        grid-column: 1 / -1;
        padding: 0;
        border-bottom: none;
        column-gap: 0.75rem;
        row-gap: 0;
    }

    .wr-dash-reports__row--head {
        padding: 0;
    }

    .wr-dash-reports__row--head .wr-dash-reports__cell {
        padding: 0.5rem 0.35rem;
        border-bottom: 2px solid #e5e7eb;
    }

    .wr-dash-reports__cell {
        padding: 0.65rem 0.35rem;
        border-bottom: 1px solid #e5e7eb;
    }
}

.wr-dash-msg {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.wr-dash-msg.ok {
    color: #047857;
}

.wr-dash-msg.err {
    color: #b91c1c;
}

.wr-dash-empty-reports {
    max-width: 40rem;
}

.wr-dash-empty-reports__lead {
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
}

.wr-dash-help-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    line-height: 1.5;
}

.wr-dash-help-list li {
    margin-bottom: 0.5rem;
}

/* “Start a new review” confirmation (<dialog>) */
.wr-dash-dialog {
    max-width: 32rem;
    width: calc(100% - 2rem);
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    background: #fff;
}

.wr-dash-dialog::backdrop {
    background: rgba(17, 24, 39, 0.45);
}

.wr-dash-dialog__form {
    padding: 1.25rem 1.35rem 1.35rem;
}

.wr-dash-dialog__title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
}

.wr-dash-dialog__text {
    margin: 0 0 1.1rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #374151;
}

.wr-dash-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
}

@media (max-width: 480px) {
    .wr-dash-dialog__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wr-dash-dialog__actions .btn {
        width: 100%;
        justify-content: center;
    }
}


.wr-dash-signup-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.wr-dash-signup-card__list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    line-height: 1.5;
    color: #374151;
}

.wr-dash-signup-card__list li {
    margin-bottom: 0.35rem;
}

/* CTA: Work with us + discuss results */
.wr-dash-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.wr-dash-cta__actions .btn {
    flex: 0 1 auto;
}

@media (max-width: 480px) {
    .wr-dash-cta__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Side drawer — mirrors site quote-enquiry-drawer (audit-report bundle has no dc-2023 quote CSS) */
.wr-dash-enquiry-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 1125;
}

.wr-dash-enquiry-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.wr-dash-enquiry-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(520px, 96vw);
    height: 100vh;
    max-height: 100dvh;
    background: #fff;
    box-shadow: -10px 0 24px rgba(0, 0, 0, 0.22);
    transform: translateX(100%);
    transition: transform 220ms ease;
    z-index: 1130;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.wr-dash-enquiry-drawer.is-open {
    transform: translateX(0);
}

.wr-dash-enquiry-drawer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.wr-dash-enquiry-drawer__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.wr-dash-enquiry-drawer__close {
    flex-shrink: 0;
    margin: -0.25rem -0.35rem 0 0;
    padding: 0.35rem 0.65rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #374151;
    cursor: pointer;
    border-radius: 6px;
}

.wr-dash-enquiry-drawer__close:hover,
.wr-dash-enquiry-drawer__close:focus-visible {
    background: #f3f4f6;
    color: #111827;
}

.wr-dash-enquiry-drawer__body {
    padding: 1rem 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.wr-dash-enquiry-drawer__intro {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #4b5563;
}

.wr-dash-enquiry-form {
    position: relative;
}

.wr-dash-enquiry-form .wr-dash-field__input {
    box-sizing: border-box;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.wr-dash-enquiry-form .wr-dash-field__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wr-dash-enquiry-form .wr-dash-enquiry-field {
  margin-bottom: 1rem;
}

.wr-dash-enquiry-field--checkbox {
  margin-bottom: 1rem;
}

.wr-dash-enquiry-form .wr-dash-enquiry-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0;
}

.wr-dash-enquiry-form .wr-dash-enquiry-checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.wr-dash-enquiry-checkbox-hint {
  margin: 0.35rem 0 0 1.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-muted, #5c5c5c);
  line-height: 1.4;
}

.wr-dash-enquiry-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: #111827;
}

.wr-dash-enquiry-required {
    font-weight: 500;
    color: #6b7280;
}

.wr-dash-enquiry-textarea {
    min-height: 7rem;
    resize: vertical;
    white-space: normal;
}

.wr-dash-enquiry-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.25rem;
}

.wr-dash-enquiry-status {
    margin-top: 0.85rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.wr-dash-enquiry-status--success {
    color: #047857;
}

.wr-dash-enquiry-status--err {
    color: #b91c1c;
}

.wr-dash-enquiry-honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
