/* Customer and artist portals, login, appointment booking and the
   public token pages. Builds on customer-page.css (colours, buttons,
   cards) and gives the classes the portal views already use
   (portal-content, order-card, btn, tabs, form-control, …) the same
   look as the quote and payment pages. Page-specific rules live in the
   view's own @section Styles. */

:root {
    --pt-radius-sm: 10px;
    --pt-warning: #b7791f;
    --pt-danger: #c53030;
    --pt-info: #2b6cb0;
}

.pt-body {
    font-family: "Open Sans", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pt-body h1,
.pt-body h2,
.pt-body h3,
.pt-body h4 {
    font-family: var(--ap-heading);
    color: var(--ap-ink);
    line-height: 1.25;
}

/* ---------- Photo band with menu ---------- */

.pt-band {
    position: relative;
    height: 220px;
    /* 21%: in a low band the faces would otherwise fall above the frame. */
    background: #222 url("/images/customer/hero.jpg") center 21% / cover;
    overflow: hidden;
    flex: none;
}

.pt-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 20, 26, 0.72) 0%,
        rgba(20, 20, 26, 0.25) 60%, rgba(20, 20, 26, 0.35) 100%);
}

/* Magenta diagonals on the right, like on the cover page. */
.pt-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ap-pink);
    opacity: 0.92;
    clip-path: polygon(80% 0, 100% 0, 100% 100%, 95% 100%);
    pointer-events: none;
}

.pt-bar {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* With the large brand block below it, the logo in the band is a duplicate. */
.pt-large .pt-logo {
    display: none;
}

.pt-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    flex: none;
}

.pt-logo img {
    width: 40px;
    height: 40px;
}

.pt-logo span {
    font-family: var(--ap-heading);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.02em;
    line-height: 1;
}

.pt-logo b {
    color: #ff7cc0;
}

.pt-logo small {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.32em;
    margin-top: 5px;
    opacity: 0.85;
}

.pt-nav {
    margin-left: auto;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pt-nav a {
    color: #fff;
    text-decoration: none;
    font-family: var(--ap-heading);
    font-weight: 700;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    transition: background 0.2s, color 0.2s;
}

.pt-nav a:hover {
    background: rgba(255, 255, 255, 0.16);
}

.pt-nav a.is-active {
    background: #fff;
    color: var(--ap-pink);
    text-shadow: none;
}

.pt-nav .pt-logout {
    opacity: 0.85;
}

.pt-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--ap-pink);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-shadow: none;
}

.pt-nav a.is-active .pt-badge {
    background: var(--ap-pink);
}

.pt-brand {
    padding-bottom: 72px;
}

/* ---------- Content ---------- */

.portal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1040px;
    margin: -64px auto 0;
    padding: 0 20px 48px;
    flex: 1;
}

.pt-large .portal-content {
    margin-top: -48px;
}

.portal-content.pt-narrow {
    max-width: 520px;
}

/* The first title on a page becomes the title card, like on the quote
   page: white, with a magenta border on top. */
.portal-content > .welcome-message:first-child,
.portal-content > .page-header:first-child,
.portal-content > .page-title:first-child,
.portal-content > .back-link:first-child + .page-header,
.portal-content > .back-link:first-child + .page-title,
.portal-content > .back-link:first-child + .welcome-message,
.pt-title {
    background: #fff;
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    border-top: 5px solid var(--ap-pink);
    padding: 30px 32px;
    margin-bottom: 26px;
}

.welcome-message h1,
.page-header h1,
.page-title h1,
.pt-title h1 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    margin-bottom: 6px;
}

.welcome-message h2,
.page-header h2,
.page-title h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}

.welcome-message p,
.page-header p,
.page-title p,
.page-subtitle {
    color: var(--ap-muted);
}

/* A second heading further down (e.g. "Openstaande facturen") stays a
   regular section heading. */
.portal-content > .welcome-message:not(:first-child) {
    margin: 40px 0 18px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: #fff;
    text-decoration: none;
    font-family: var(--ap-heading);
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.back-link > i {
    margin-right: 8px;
}

.portal-content > .back-link:not(:first-child) {
    color: var(--ap-muted);
    text-shadow: none;
}

.back-link:hover {
    color: var(--ap-pink-soft);
}

.portal-content > .back-link:not(:first-child):hover {
    color: var(--ap-pink);
}

/* Text link inside a card, e.g. "Terug naar inloggen". */
.pt-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ap-pink);
    font-family: var(--ap-heading);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.pt-link:hover {
    color: var(--ap-pink-dark);
    text-decoration: underline;
}

/* "Terug naar opdracht" at the top of the title card; above the card it
   would push the card down, so it no longer overlaps the band. */
.pt-title-back {
    margin-bottom: 12px;
    font-size: 13px;
}

.pt-link-center {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.text-muted {
    color: var(--ap-muted);
}

/* ---------- Cards ---------- */

.card,
.order-card,
.section-card,
.info-section,
.pt-card {
    background: #fff;
    border: none;
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    margin-bottom: 22px;
    overflow: hidden;
}

.card-body,
.section-body,
.info-section-body,
.pt-card-body {
    padding: 28px 30px;
}

.order-card {
    transition: transform 0.15s, box-shadow 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(210, 35, 133, 0.14);
}

.order-card-header,
.section-header,
.info-section-header,
.card-header {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--ap-pink-soft);
    border-bottom: none;
}

.section-header h2,
.section-header h3,
.info-section-header h3,
.card-header h2,
.card-header h3 {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
}

.section-header i,
.info-section-header h3 i,
.card-header i {
    color: var(--ap-pink);
}

.order-date-label,
.order-info-label,
.info-label,
.detail-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ap-muted);
    margin-bottom: 4px;
}

.order-date-label {
    color: var(--ap-pink);
}

.order-date {
    font-family: var(--ap-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--ap-ink);
}

.order-card-body {
    padding: 24px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.order-info-value,
.info-value,
.detail-value {
    font-weight: 600;
    color: var(--ap-ink);
    overflow-wrap: anywhere;
}

.order-card-footer,
.card-footer {
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--ap-line);
    background: #fff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px 24px;
}

.detail-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--ap-line);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row i {
    color: var(--ap-pink);
    width: 18px;
}

.completed-card {
    opacity: 0.85;
}

.completed-card .order-card-header {
    background: var(--ap-bg);
}

.empty-state {
    text-align: center;
    padding: 44px 30px;
}

.empty-state i {
    font-size: 44px;
    color: var(--ap-pink);
    opacity: 0.6;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--ap-muted);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: var(--ap-heading);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s,
        transform 0.15s, box-shadow 0.2s;
    line-height: 1.2;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--ap-pink);
    color: #fff;
}

.btn-primary:hover {
    background: var(--ap-pink-dark);
    box-shadow: 0 8px 22px rgba(210, 35, 133, 0.3);
}

.btn-success {
    background: var(--ap-success);
    color: #fff;
}

.btn-success:hover {
    background: var(--ap-success-dark);
}

.btn-secondary {
    background: var(--ap-bg);
    color: var(--ap-ink);
}

.btn-secondary:hover {
    background: var(--ap-line);
}

.btn-outline {
    background: transparent;
    color: var(--ap-ink);
    border-color: var(--ap-ink);
}

.btn-outline:hover {
    background: var(--ap-ink);
    color: #fff;
}

.btn-danger {
    background: var(--pt-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #9b2c2c;
    box-shadow: 0 8px 22px rgba(197, 48, 48, 0.28);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 15px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ---------- Badges ---------- */

.badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--ap-bg);
    color: var(--ap-ink);
    white-space: nowrap;
}

.badge-success {
    background: #dff4e7;
    color: #135c31;
}

.badge-warning {
    background: #fdf1dc;
    color: #7a4d0b;
}

.badge-danger {
    background: #fbe3e5;
    color: #7a1c26;
}

.badge-info {
    background: #e6f0fb;
    color: #1f4a7a;
}

.badge-secondary {
    background: var(--ap-bg);
    color: var(--ap-muted);
}

.badge-pink {
    background: var(--ap-pink-soft);
    color: var(--ap-pink);
}

/* Card body without padding, for lists that draw their own rows. */
.section-body.is-flush,
.card-body.is-flush,
.pt-card-body.is-flush {
    padding: 0;
}

/* Title per line in Views/Shared/_LineSubtexts.cshtml. */
.line-subtext-title {
    font-weight: 600;
    color: var(--ap-ink);
    margin-top: 6px;
}

/* ---------- Tabs ---------- */

.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    margin-bottom: 22px;
    background: #fff;
    border: none;
    border-radius: 999px;
    box-shadow: var(--ap-shadow);
    flex-wrap: wrap;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    background: none;
    color: var(--ap-muted);
    font-family: var(--ap-heading);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.tab:hover {
    color: var(--ap-ink);
}

.tab.active {
    background: var(--ap-ink);
    color: #fff;
}

.tab-count {
    background: var(--ap-pink);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    margin: 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Forms ---------- */

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-label,
.form-group > label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--ap-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--ap-ink);
    text-transform: none;
    letter-spacing: 0;
}

.form-control,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #dcdce3;
    border-radius: var(--pt-radius-sm);
    background: #fff;
    color: var(--ap-ink);
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--ap-pink);
    box-shadow: 0 0 0 3px rgba(210, 35, 133, 0.12);
}

textarea.form-control {
    resize: vertical;
}

.input-wrapper {
    position: relative;
}

.input-wrapper > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ap-muted);
}

.input-wrapper .form-control {
    padding-left: 44px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--ap-pink);
    cursor: pointer;
}

.field-validation-error,
.text-danger {
    color: var(--pt-danger);
    font-size: 13px;
}

.form-group .field-validation-error {
    display: block;
    margin-top: 6px;
}

/* ---------- Alerts ---------- */

.alert,
.error-message,
.success-message,
.info-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--pt-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    border: none;
}

.alert-success,
.success-message {
    background: #dff4e7;
    color: #135c31;
}

.alert-error,
.alert-danger,
.error-message {
    background: #fbe3e5;
    color: #7a1c26;
}

.alert-warning {
    background: #fdf1dc;
    color: #7a4d0b;
}

.alert-info,
.info-message {
    background: #e6f0fb;
    color: #1f4a7a;
}

.validation-summary-errors ul {
    list-style: none;
}

/* ---------- Tables ---------- */

.pt-table,
.portal-content table.table {
    width: 100%;
    border-collapse: collapse;
}

.pt-table th,
.portal-content table.table th {
    text-align: left;
    padding: 0 12px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ap-muted);
    border-bottom: 2px solid var(--ap-ink);
}

.pt-table td,
.portal-content table.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--ap-line);
}

/* ---------- Preparation on the order page ---------- */

.pt-prep {
    padding: 28px 30px;
}

.pt-prep-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 14px;
}

.pt-prep-head h2 {
    font-size: 22px;
    font-weight: 800;
}

.pt-prep-score {
    text-align: right;
    line-height: 1;
}

.pt-prep-score strong {
    font-family: var(--ap-heading);
    font-size: 30px;
    font-weight: 800;
    color: var(--ap-pink);
}

.pt-prep-score span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ap-muted);
}

.pt-prep-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--ap-bg);
    overflow: hidden;
    margin-bottom: 18px;
}

.pt-prep-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ap-pink), var(--ap-pink-dark));
    transition: width 0.6s ease-out;
}

.pt-prep-list {
    list-style: none;
}

.pt-prep-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--ap-line);
}

.pt-prep-icon {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ap-pink-soft);
    color: var(--ap-pink);
}

.pt-prep-list li.is-done .pt-prep-icon {
    background: var(--ap-success);
    color: #fff;
}

.pt-prep-list li.is-info .pt-prep-icon {
    background: var(--ap-bg);
    color: var(--ap-muted);
}

.pt-prep-text {
    flex: 1;
    min-width: 0;
}

.pt-prep-text strong {
    display: block;
    color: var(--ap-ink);
    font-family: var(--ap-heading);
    font-size: 15px;
}


.pt-prep-text span {
    display: block;
    font-size: 14px;
    color: var(--ap-muted);
}

.pt-prep-list li.is-done .pt-prep-text strong {
    color: var(--ap-muted);
}

/* ---------- Shared page helpers ---------- */

/* Rules that several portal pages used identically. */

/* Buttons */

.btn-decline {
    background: var(--pt-danger);
    color: #fff;
}

/* Overdue and paid states */

.invoice-due {
    font-family: var(--ap-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--ap-ink);
    margin-left: 6px;
}

.invoice-due.is-overdue,
.is-overdue {
    color: var(--pt-danger);
}

.is-paid {
    color: var(--ap-success);
}

.overdue-badge {
    margin-left: 6px;
    background: #fbe3e5;
    color: var(--pt-danger);
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.is-overdue {
    color: var(--pt-danger);
}

/* Product modal (order page, upsell) */

.product-modal h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
}

.product-modal-price {
    font-family: var(--ap-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--ap-pink);
}

.product-modal-info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--ap-pink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.product-modal-info-link:hover {
    text-decoration: underline;
}

.product-modal-info-link[hidden] {
    display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
    .pt-band {
        height: auto;
        min-height: 170px;
        padding-bottom: 70px;
    }

    .pt-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 14px 16px;
    }

    .pt-nav {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .pt-nav a {
        font-size: 13px;
        padding: 7px 12px;
    }

    .pt-band::after {
        clip-path: polygon(88% 0, 100% 0, 100% 100%, 97% 100%);
    }

    .portal-content {
        padding: 0 12px 32px;
        margin-top: -54px;
    }

    .portal-content > .welcome-message:first-child,
    .portal-content > .page-header:first-child,
    .portal-content > .page-title:first-child,
    .pt-title {
        padding: 22px 18px;
    }

    .card-body,
    .section-body,
    .info-section-body,
    .pt-card-body,
    .order-card-body {
        padding: 20px 18px;
    }

    .order-card-header,
    .section-header,
    .info-section-header,
    .card-header,
    .order-card-footer,
    .card-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .pt-prep {
        padding: 22px 18px;
    }

    .pt-prep-list li {
        flex-wrap: wrap;
    }

    /* Text spans the full width next to the icon, button below it. */
    .pt-prep-text {
        flex: 1 1 calc(100% - 56px);
    }

    .pt-prep-list li .btn {
        margin-left: 56px;
    }

    .tabs {
        display: flex;
        border-radius: 16px;
    }

    .tab {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
    }
}
