/* ==========================================================================
   NobatDr24 — integration layer for the "نوبت دکتر 24" plugin
   Loaded after all plugin stylesheets so these rules win the cascade.
   Goal: make every plugin screen inherit the theme design system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography hand-off
   The plugin hard-codes its own font (`est`) on its containers — and, worse,
   on bare `h1–h6 / p / span / label / li` elements globally. Hand everything
   back to the theme font. Icon fonts (bootstrap-icons) are excluded so the
   glyphs keep working.
   -------------------------------------------------------------------------- */
.nobatnegar-archive-container,
.nobatnegar-archive-container *:not([class*="bi-"]),
.nobatnegar-search-box,
.nobatnegar-search-box *:not([class*="bi-"]),
.nd-plugin-surface,
.nd-plugin-surface *:not([class*="bi-"]) {
    font-family: var(--nd-font) !important;
}

/* Theme chrome must survive the plugin's global font rule even when its
   stylesheet is printed late (inside a shortcode render). */
.nd-topbar, .nd-topbar *:not([class*="bi-"]),
.nd-header, .nd-header *:not([class*="bi-"]),
.nd-drawer, .nd-drawer *:not([class*="bi-"]),
.nd-footer, .nd-footer *:not([class*="bi-"]),
.nd-hero, .nd-hero *:not([class*="bi-"]),
.nd-page-hero, .nd-page-hero *:not([class*="bi-"]),
.nd-section, .nd-section *:not([class*="bi-"]),
.nd-entry, .nd-entry *:not([class*="bi-"]),
.nd-empty, .nd-empty *:not([class*="bi-"]),
.nd-cta, .nd-cta *:not([class*="bi-"]),
.nd-404, .nd-404 *:not([class*="bi-"]) {
    font-family: var(--nd-font) !important;
}

.nobatnegar-archive-container {
    padding-block: 2rem 3rem;
}

/* --------------------------------------------------------------------------
   2. Archive header
   -------------------------------------------------------------------------- */
.nobatnegar-archive-container .nobatnegar-archive-header {
    text-align: start;
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-xl);
    box-shadow: var(--nd-shadow-flat);
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.nobatnegar-archive-container .nobatnegar-archive-header::after {
    content: "";
    position: absolute;
    inset-inline-start: -70px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2, 132, 199, .10), transparent 68%);
    pointer-events: none;
}
.nobatnegar-archive-container .nobatnegar-archive-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--nd-text);
    margin: 0 0 .35rem;
    line-height: 1.5;
}
.nobatnegar-archive-container .nobatnegar-archive-header p {
    color: var(--nd-text-3);
    font-size: .9375rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   3. Filters
   -------------------------------------------------------------------------- */
.nobatnegar-archive-container .nobatnegar-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: .6rem;
    align-items: center;
    justify-content: stretch;
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-lg);
    box-shadow: var(--nd-shadow-flat);
    padding: .75rem;
    margin-bottom: 1.5rem;
}
.nobatnegar-archive-container .filter-group { min-width: 0; flex: 1 1 auto; }
.nobatnegar-archive-container .filter-group .filter-input,
.nobatnegar-archive-container .filter-group .filter-select {
    width: 100% !important;
    height: 46px;
    padding: 0 .9rem !important;
    font-size: .875rem;
    color: var(--nd-text);
    background-color: var(--nd-surface);
    border: 1px solid var(--nd-border-strong) !important;
    border-radius: var(--nd-radius) !important;
    box-shadow: none !important;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.nobatnegar-archive-container .filter-group .filter-input:focus,
.nobatnegar-archive-container .filter-group .filter-select:focus {
    border-color: var(--nd-sky) !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, .12) !important;
}
.nobatnegar-archive-container .filter-actions {
    display: flex;
    gap: .4rem;
    flex: none;
}
.nobatnegar-archive-container .filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 1.15rem;
    font-size: .875rem;
    font-weight: 700;
    border-radius: var(--nd-radius) !important;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s ease;
    text-decoration: none;
}
.nobatnegar-archive-container .filter-button.apply {
    background: var(--nd-primary);
    color: #fff;
}
.nobatnegar-archive-container .filter-button.apply:hover { background: var(--nd-primary-hover); }
.nobatnegar-archive-container .filter-button.reset {
    background: var(--nd-surface-2);
    color: var(--nd-text-2);
    border-color: var(--nd-border);
}
.nobatnegar-archive-container .filter-button.reset:hover { background: #e2e8f0; }

/* --------------------------------------------------------------------------
   4. Provider cards (grid mode)
   -------------------------------------------------------------------------- */
.nobatnegar-archive-container .providers-cards-container { gap: 1.15rem; }

.nobatnegar-archive-container .arachive-provider-card {
    background: var(--nd-surface);
    border: 1px solid var(--nd-border) !important;
    border-radius: var(--nd-radius-lg) !important;
    box-shadow: var(--nd-shadow-flat) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    overflow: hidden;
}
.nobatnegar-archive-container .arachive-provider-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--nd-shadow-raised) !important;
    border-color: var(--nd-border-strong) !important;
}

.nobatnegar-archive-container .arachive-provider-card .provider-image-wrapper {
    position: relative;
    /* The plugin lets the avatar size the card; a square 160px avatar then
       renders at full column width. Pin the media box to a sane ratio. */
    aspect-ratio: 4 / 3;
    max-height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--nd-surface-3), var(--nd-surface-2));
}
.nobatnegar-archive-container .arachive-provider-card .provider-img {
    display: block;
    width: 100%;
    height: 100%;
}
.nobatnegar-archive-container .arachive-provider-card .provider-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    object-fit: cover;
    object-position: center 22%;
}

.nobatnegar-archive-container .arachive-provider-card h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--nd-text);
    margin: 0 0 .35rem;
}
.nobatnegar-archive-container .arachive-provider-card h4 a { color: var(--nd-text); }
.nobatnegar-archive-container .arachive-provider-card h4 a:hover { color: var(--nd-primary); }

.nobatnegar-archive-container .arachive-provider-card h5 {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--nd-text-3);
    margin: 0 0 .25rem;
    line-height: 1.8;
}
.nobatnegar-archive-container .arachive-provider-card h5.provider-title {
    color: var(--nd-text-2);
    font-weight: 600;
}
.nobatnegar-archive-container .arachive-provider-card .provider-description {
    font-size: .8125rem;
    color: var(--nd-text-3);
    line-height: 1.9;
}

.nobatnegar-archive-container .arachive-provider-card .button.details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    height: 42px;
    padding: 0 1rem;
    font-size: .8125rem;
    font-weight: 700;
    color: #fff;
    background: var(--nd-primary);
    border: 0;
    border-radius: var(--nd-radius) !important;
    transition: background .16s ease;
    text-decoration: none;
}
.nobatnegar-archive-container .arachive-provider-card .button.details-button:hover {
    background: var(--nd-primary-hover);
    color: #fff;
}

.nobatnegar-archive-container .contact-box .icons-left a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--nd-radius-full);
    background: var(--nd-surface-2);
    color: var(--nd-text-2);
    transition: all .16s ease;
}
.nobatnegar-archive-container .contact-box .icons-left a:hover {
    background: var(--nd-primary-tint);
    color: var(--nd-primary);
}

.nobatnegar-archive-container .city-cat {
    font-size: .75rem;
    color: var(--nd-text-3);
}
.nobatnegar-archive-container .city-cat .cat-item,
.nobatnegar-archive-container .city-cat .city-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--nd-surface-2);
    border-radius: var(--nd-radius-full);
    padding: .18rem .6rem;
    margin-inline-end: .3rem;
}
.nobatnegar-archive-container .city-cat a { color: var(--nd-text-2); font-weight: 600; }
.nobatnegar-archive-container .city-cat a:hover { color: var(--nd-primary); }

/* Stars */
.nobatnegar-archive-container .nn-star-rating { color: var(--nd-border-strong); font-size: .875rem; }
.nobatnegar-archive-container .nn-star-rating .nn-star.filled { color: var(--nd-amber); }
.nobatnegar-archive-container .nn-rating-count {
    font-size: .75rem;
    color: var(--nd-text-3);
    margin-inline-start: .35rem;
}

/* List mode keeps the same surface, just flatter */
.nobatnegar-archive-container .list-mode-card { padding: 1rem !important; }

/* Pagination produced by the plugin */
.nobatnegar-archive-container .pagination,
.nobatnegar-archive-container .nobatnegar-pagination {
    display: flex;
    justify-content: center;
    gap: .35rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.nobatnegar-archive-container .pagination a,
.nobatnegar-archive-container .pagination span,
.nobatnegar-archive-container .nobatnegar-pagination a,
.nobatnegar-archive-container .nobatnegar-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding-inline: .5rem;
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius);
    color: var(--nd-text-2);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
}
.nobatnegar-archive-container .pagination .current,
.nobatnegar-archive-container .nobatnegar-pagination .current {
    background: var(--nd-primary);
    border-color: var(--nd-primary);
    color: #fff;
}

/* --------------------------------------------------------------------------
   5. Search box widget (Elementor)
   -------------------------------------------------------------------------- */
.nobatnegar-search-box {
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-xl);
    box-shadow: var(--nd-shadow-floating);
    padding: .5rem;
}
.nobatnegar-search-box .search-input-wrapper {
    display: flex;
    gap: .5rem;
    align-items: stretch;
    flex-wrap: wrap;
}
.nobatnegar-search-box .all-fields {
    display: flex;
    gap: .5rem;
    flex: 1 1 auto;
    flex-wrap: wrap;
}
.nobatnegar-search-box .city-cate { display: flex; gap: .5rem; flex: 0 1 340px; }
.nobatnegar-search-box select,
.nobatnegar-search-box input[type="text"],
.nobatnegar-search-box input[type="search"] {
    height: 48px;
    border: 1px solid var(--nd-border) !important;
    border-radius: var(--nd-radius) !important;
    background-color: var(--nd-surface) !important;
    font-size: .875rem;
    box-shadow: none !important;
}
.nobatnegar-search-box button,
.nobatnegar-search-box input[type="submit"] {
    height: 48px;
    padding: 0 1.5rem;
    background: var(--nd-primary);
    color: #fff;
    border: 0;
    border-radius: var(--nd-radius);
    font-weight: 700;
    font-size: .875rem;
    cursor: pointer;
}
.nobatnegar-search-box button:hover { background: var(--nd-primary-hover); }

/* --------------------------------------------------------------------------
   6. Booking UI — date slider, slots, forms
   -------------------------------------------------------------------------- */
.nd-plugin-surface .calendar-swiper,
.nobatnegar-archive-container .calendar-swiper { padding-bottom: .25rem; }

.nobatnegar-archive-container .calendar-month,
.nd-plugin-surface .calendar-month {
    font-size: .875rem;
    font-weight: 700;
    color: var(--nd-text-2);
    margin-bottom: .5rem;
}

.nobatnegar-archive-container .calendar-day,
.nd-plugin-surface .calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-width: 72px;
    padding: .6rem .5rem;
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-md);
    cursor: pointer;
    transition: all .16s ease;
    font-size: .75rem;
    color: var(--nd-text-3);
    line-height: 1.6;
}
.nobatnegar-archive-container .calendar-day:hover,
.nd-plugin-surface .calendar-day:hover {
    border-color: var(--nd-primary-soft);
    background: var(--nd-primary-tint);
}
.nobatnegar-archive-container .calendar-day.active,
.nobatnegar-archive-container .calendar-day.selected,
.nd-plugin-surface .calendar-day.active,
.nd-plugin-surface .calendar-day.selected {
    background: var(--nd-primary);
    border-color: var(--nd-primary);
    color: #fff;
}
.nobatnegar-archive-container .calendar-day.disabled,
.nobatnegar-archive-container .calendar-day.empty,
.nd-plugin-surface .calendar-day.disabled,
.nd-plugin-surface .calendar-day.empty {
    background: var(--nd-surface-2);
    color: #94a3b8;
    border-color: var(--nd-border);
    cursor: not-allowed;
    opacity: .7;
}

.nobatnegar-archive-container .time-slots,
.nd-plugin-surface .time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.nobatnegar-archive-container .time-slot,
.nd-plugin-surface .time-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: .5rem .85rem;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--nd-secondary);
    background: var(--nd-surface);
    border: 1px solid var(--nd-secondary-strong);
    border-radius: var(--nd-radius-full);
    cursor: pointer;
    transition: all .16s ease;
    line-height: 1.6;
}
.nobatnegar-archive-container .time-slot:hover,
.nd-plugin-surface .time-slot:hover {
    background: var(--nd-secondary-tint);
}
.nobatnegar-archive-container .time-slot.selected,
.nobatnegar-archive-container .time-slot.active,
.nd-plugin-surface .time-slot.selected,
.nd-plugin-surface .time-slot.active {
    background: var(--nd-primary);
    border-color: var(--nd-primary);
    color: #fff;
}
.nobatnegar-archive-container .time-slot.disabled,
.nobatnegar-archive-container .time-slot.full,
.nd-plugin-surface .time-slot.disabled,
.nd-plugin-surface .time-slot.full {
    background: var(--nd-surface-2);
    border-color: var(--nd-border);
    color: #94a3b8;
    text-decoration: line-through;
    cursor: not-allowed;
}
.nobatnegar-archive-container .time-slot.limited,
.nd-plugin-surface .time-slot.limited {
    border-color: var(--nd-amber);
    color: #b45309;
}

/* Generic form controls inside plugin surfaces */
.nd-plugin-surface input[type="text"],
.nd-plugin-surface input[type="email"],
.nd-plugin-surface input[type="tel"],
.nd-plugin-surface input[type="number"],
.nd-plugin-surface input[type="password"],
.nd-plugin-surface input[type="date"],
.nd-plugin-surface select,
.nd-plugin-surface textarea,
.nobatnegar-archive-container input[type="text"],
.nobatnegar-archive-container input[type="email"],
.nobatnegar-archive-container input[type="tel"],
.nobatnegar-archive-container input[type="number"],
.nobatnegar-archive-container select,
.nobatnegar-archive-container textarea {
    border-radius: var(--nd-radius) !important;
    border: 1px solid var(--nd-border-strong) !important;
    background-color: var(--nd-surface);
    box-shadow: none;
    font-size: .875rem;
    color: var(--nd-text);
}
.nd-plugin-surface input:focus,
.nd-plugin-surface select:focus,
.nd-plugin-surface textarea:focus {
    border-color: var(--nd-sky) !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, .12) !important;
    outline: none;
}

/* Buttons that the plugin emits with .btn / .button classes */
.nd-plugin-surface .btn,
.nobatnegar-archive-container .btn {
    border-radius: var(--nd-radius) !important;
    font-weight: 700;
}
.nd-plugin-surface .btn-primary,
.nd-plugin-surface .btn.btn-primary {
    background: var(--nd-primary) !important;
    border-color: var(--nd-primary) !important;
    color: #fff !important;
}
.nd-plugin-surface .btn-primary:hover {
    background: var(--nd-primary-hover) !important;
}

/* --------------------------------------------------------------------------
   7. Provider profile page (single nobat_provider)
   -------------------------------------------------------------------------- */
.nd-provider-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
}
.nd-provider-aside {
    position: sticky;
    top: calc(var(--nd-header-h) + 16px);
    display: grid;
    gap: 1rem;
}
.nd-panel {
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-lg);
    box-shadow: var(--nd-shadow-flat);
    padding: 1.25rem;
}
.nd-panel h3 {
    font-size: 1rem;
    margin: 0 0 .9rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.nd-panel h3 svg { width: 18px; height: 18px; color: var(--nd-primary); }
.nd-kv { display: flex; justify-content: space-between; gap: 1rem; font-size: .8125rem; padding-block: .4rem; }
.nd-kv + .nd-kv { border-top: 1px dashed var(--nd-border); }
.nd-kv dt { color: var(--nd-text-3); margin: 0; }
.nd-kv dd { margin: 0; font-weight: 700; color: var(--nd-text); }

@media (max-width: 1024px) {
    .nd-provider-shell { grid-template-columns: minmax(0, 1fr); }
    .nd-provider-aside { position: static; }
}

/* --------------------------------------------------------------------------
   7b. Plugin forms (registration, dashboard, checkout)
   The plugin owns the grid; the theme only harmonises labels, controls and
   section cards so the form reads like the rest of the design system.
   -------------------------------------------------------------------------- */
.provider-registration-form .nn-form-label,
.nobat-negar-custom-form .nn-form-label,
.provider-registration-form label,
.nobat-negar-custom-form label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--nd-text-2);
    margin-bottom: .4rem;
    line-height: 1.7;
}

.provider-registration-form .nn-form-control,
.provider-registration-form .nn-form-select,
.nobat-negar-custom-form .nn-form-control,
.nobat-negar-custom-form .nn-form-select {
    width: 100%;
    min-height: 44px;
    font-size: .875rem;
    color: var(--nd-text);
    background-color: var(--nd-surface);
    border: 1px solid var(--nd-border-strong);
    border-radius: var(--nd-radius);
    padding: .55rem .85rem;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.provider-registration-form .nn-form-control:focus,
.provider-registration-form .nn-form-select:focus,
.nobat-negar-custom-form .nn-form-control:focus,
.nobat-negar-custom-form .nn-form-select:focus {
    border-color: var(--nd-sky);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, .12);
    outline: none;
}

.provider-registration-form textarea.nn-form-control,
.nobat-negar-custom-form textarea.nn-form-control {
    min-height: 110px;
    line-height: 1.9;
}

.provider-registration-form .reg-sec,
.nobat-negar-custom-form .reg-sec {
    margin-bottom: 1rem;
}

.provider-registration-form .section-main-info {
    background: var(--nd-surface);
    border: 1px solid var(--nd-border) !important;
    border-radius: var(--nd-radius-lg) !important;
    box-shadow: var(--nd-shadow-flat);
    padding: 1.35rem !important;
    margin-bottom: 1.25rem !important;
}

.provider-registration-form .nobatnegar-reg-box-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--nd-text);
    padding-bottom: .75rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--nd-border);
}

.provider-registration-form .nn-row,
.nobat-negar-custom-form .nn-row {
    row-gap: .35rem;
}

.provider-registration-form input[type="file"] {
    padding: .45rem .6rem;
    font-size: .8125rem;
    color: var(--nd-text-3);
}

/* Submit / primary actions inside plugin forms */
.provider-registration-form button[type="submit"],
.nobat-negar-custom-form button[type="submit"],
.provider-registration-form .nn-btn-primary,
.nobat-negar-custom-form .nn-btn-primary {
    background: var(--nd-primary);
    border: 1px solid var(--nd-primary);
    color: #fff;
    font-weight: 700;
    border-radius: var(--nd-radius);
    padding: .7rem 1.6rem;
    box-shadow: var(--nd-shadow-flat);
    cursor: pointer;
}

.provider-registration-form button[type="submit"]:hover,
.nobat-negar-custom-form button[type="submit"]:hover,
.provider-registration-form .nn-btn-primary:hover,
.nobat-negar-custom-form .nn-btn-primary:hover {
    background: var(--nd-primary-hover);
    border-color: var(--nd-primary-hover);
}

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .nobatnegar-archive-container .nobatnegar-filters {
        grid-template-columns: 1fr;
    }
    .nobatnegar-archive-container .filter-actions { justify-content: stretch; }
    .nobatnegar-archive-container .filter-button { flex: 1; }
}

@media (max-width: 640px) {
    .nobatnegar-archive-container { padding-inline: 1rem; }
    .nobatnegar-archive-container .nobatnegar-archive-header { padding: 1.25rem 1rem; }
    .nobatnegar-archive-container .nobatnegar-archive-header h1 { font-size: 1.35rem; }
    .nobatnegar-archive-container .arachive-provider-card { border-radius: var(--nd-radius) !important; }
}
