﻿/* E2-6544 - Patient page of a network portal (NetworkPortalHome.aspx). The availability cards reuse
   availabilityByOfficePlace.css. */

.network-portal-home-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 0;
}

.network-portal-home-logo {
    width: 150px;
    height: auto;
    flex-shrink: 0;
}

.network-portal-home-title {
    margin: 0;
}

/* The welcome text is plain text typed by LogicSanté staff: its line breaks are kept. */
.network-portal-home-welcome {
    white-space: pre-line;
    margin-bottom: 0;
}

.network-portal-home-search-error {
    margin: 16px 0 0 0;
}

/* ---- Search form ------------------------------------------------------------------------------
   A card with labels above the fields. The accent follows the colour of the portal when it has
   one (whiteLabelPortal sets --ed-main-color), the easydoct green otherwise. */
.nph-search {
    --nph-accent: var(--ed-white-label-portal-secondary-color, var(--ed-main-color, #72C02C));
    --nph-border: #dfe5e2;
    --nph-radius: 10px;
    --nph-field-height: 44px;
    max-width: 760px;
    margin-top: 20px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--nph-border);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(30, 50, 40, 0.06);
}

.nph-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
}

.nph-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nph-field-wide {
    grid-column: 1 / -1;
}

.nph-field > label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #3b4642;
    background: transparent;
}

.nph-field > label .fi {
    color: var(--nph-accent);
    font-size: 16px;
    line-height: 1;
}

.nph-required {
    color: #c0392b;
    margin-left: -4px;
}

.nph-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #6b7773;
}

.nph-hint:empty {
    display: none;
}

/* Text fields and date pickers */
.nph-search .form-control {
    height: var(--nph-field-height);
    border: 1px solid var(--nph-border);
    border-radius: var(--nph-radius);
    box-shadow: none;
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nph-search .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.nph-search .input-group-addon {
    border: 1px solid var(--nph-border);
    border-left: none;
    border-radius: 0 var(--nph-radius) var(--nph-radius) 0;
    background: #f5f8f6;
    color: var(--nph-accent);
    cursor: pointer;
}

.nph-search .form-control:focus {
    border-color: var(--nph-accent);
    box-shadow: 0 0 0 3px rgba(114, 192, 44, 0.18);
}

/* Select2 exam selectors, aligned on the other fields */
.nph-search .select2-container--default .select2-selection--single {
    height: var(--nph-field-height);
    /* The site stylesheet pads it by 6px, which pushes the selected exam below the centre line. */
    padding: 0;
    border: 1px solid var(--nph-border);
    border-radius: var(--nph-radius);
}

.nph-search .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(var(--nph-field-height) - 2px);
    padding-left: 12px;
    font-size: 15px;
    color: #2f3a36;
}

.nph-search .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(var(--nph-field-height) - 2px);
    right: 8px;
}

.nph-search .select2-container--default.select2-container--focus .select2-selection--single,
.nph-search .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--nph-accent);
}

/* Actions */
.nph-search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.nph-search-note {
    font-size: 13px;
    color: #8a9591;
}

.nph-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 28px;
}

.nph-search-button .fi {
    line-height: 1;
}

/* ---- Availability cards ----------------------------------------------------------------------- */
/* Logo of the licence, before the name of its office place. */
.npa-licence-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: contain;
    padding: 4px;
    background: #fff;
    border: 1px solid #e6ebe8;
    border-radius: 10px;
}

/* ---- Exams and centres rendered server side ---------------------------------------------------- */
.nph-seo-section h2 {
    margin-top: 0;
}

.nph-seo-section h3 {
    margin: 16px 0 8px 0;
    font-size: 17px;
}

.nph-seo-licence-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nph-seo-exam-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0 24px;
}

.nph-seo-exam-group ul {
    margin: 0;
    padding-left: 18px;
}

.nph-seo-places {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nph-seo-place {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e6ebe8;
    border-radius: 10px;
}

.nph-seo-place address {
    margin: 4px 0 0 0;
    color: #4f5b57;
}

.nph-seo-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

@media (max-width: 767px) {
    .npa-licence-logo {
        width: 44px;
        height: 44px;
    }

    .network-portal-home-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nph-search {
        padding: 18px 16px;
    }

    .nph-search-grid {
        grid-template-columns: 1fr;
    }

    .nph-search-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .nph-search-button {
        width: 100%;
    }
}
