/*
 * ============================================================
 *  RiNova — Global Rounded UI  (rinova-rounded.css)
 *  Add to _Layout.cshtml AFTER all other stylesheets.
 *  Applies consistent border-radius to every box/button/input
 *  across the project without touching individual pages.
 * ============================================================
 */

/* ── CSS variables so you can tune everything from one place ── */
:root {
    --rn-r-sm: 6px; /* badges, tags, small chips         */
    --rn-r-md: 10px; /* inputs, selects, small cards      */
    --rn-r-lg: 14px; /* main cards, panels, modals        */
    --rn-r-xl: 20px; /* hero banners, section wrappers    */
    --rn-r-pill: 50px; /* buttons, search bars              */
}

/* ══════════════════════════════════════════════════════════
   1.  BUTTONS
   ══════════════════════════════════════════════════════════ */
button,
.btn,
[class*="btn-"],
input[type="submit"],
input[type="button"],
input[type="reset"],
a.btn,
.s-btn,
.login_btn,
.k-button,
.k-button-solid,
.k-grid-toolbar .k-button {
    border-radius: var(--rn-r-pill) !important;
}

/* ══════════════════════════════════════════════════════════
   2.  INPUTS & FORM CONTROLS
   ══════════════════════════════════════════════════════════ */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea,
select,
.form-control,
.form-select,
.k-input,
.k-textbox,
.k-textarea,
.k-combobox .k-input,
.k-dropdownlist,
.k-multiselect,
.k-datepicker .k-input,
.nltr-input,
.pika-single input {
    border-radius: var(--rn-r-md) !important;
}

/* ══════════════════════════════════════════════════════════
   3.  CARDS  (Bootstrap + custom .card + project classes)
   ══════════════════════════════════════════════════════════ */
.card,
.search-card,
.job-listing,
.job-listing-box,
.company-card,
.challenge-card,
.news-card,
.panel,
.widget,
.info-box,
.feature-box,
[class*="-card"],
[class*="card-"] {
    border-radius: var(--rn-r-lg) !important;
}

    /* Keep inner card images sharp at the top */
    .card > img:first-child,
    .card-img-top {
        border-radius: var(--rn-r-lg) var(--rn-r-lg) 0 0 !important;
    }

/* ══════════════════════════════════════════════════════════
   4.  MODALS & DROPDOWNS
   ══════════════════════════════════════════════════════════ */
.modal-content,
.modal-dialog,
.k-dialog,
.k-window {
    border-radius: var(--rn-r-lg) !important;
    overflow: hidden;
}

.dropdown-menu,
.k-popup,
.k-list-container,
.k-animation-container > .k-popup {
    border-radius: var(--rn-r-md) !important;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   5.  ALERTS & BADGES
   ══════════════════════════════════════════════════════════ */
.alert,
.badge,
.tab-badge,
.search-card-tag,
.label,
[class*="badge-"],
[class*="alert-"] {
    border-radius: var(--rn-r-pill) !important;
}

/* ══════════════════════════════════════════════════════════
   6.  TABLES  (Kendo Grid + Bootstrap)
   ══════════════════════════════════════════════════════════ */
.k-grid,
.table-responsive,
.table-wrapper {
    border-radius: var(--rn-r-lg) !important;
    overflow: hidden;
}

/* Clip the outermost grid border */
.k-grid {
    border-radius: var(--rn-r-lg) !important;
}

/* Round only the outer corners of the header row */
.k-grid-header {
    border-radius: var(--rn-r-lg) var(--rn-r-lg) 0 0 !important;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   7.  NAVIGATION TABS & PILLS
   ══════════════════════════════════════════════════════════ */
.nav-tabs .nav-link,
.search-tab {
    border-radius: var(--rn-r-md) var(--rn-r-md) 0 0 !important;
}

.nav-pills .nav-link {
    border-radius: var(--rn-r-pill) !important;
}

/* ══════════════════════════════════════════════════════════
   8.  SECTION / PAGE WRAPPERS  (hero banners, title areas)
   ══════════════════════════════════════════════════════════ */
.page-title-area,
.hero-section,
.banner-area,
.section-wrapper,
.subscribe-newsletter {
    border-radius: 0 0 var(--rn-r-xl) var(--rn-r-xl) !important;
}

/* ══════════════════════════════════════════════════════════
   9.  FOOTER newsletter / subscribe box
   ══════════════════════════════════════════════════════════ */
.subcribe-input {
    border-radius: var(--rn-r-pill) !important;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   10. OWL CAROUSEL  — dot indicators
   ══════════════════════════════════════════════════════════ */
.owl-dot span {
    border-radius: var(--rn-r-pill) !important;
}

/* ══════════════════════════════════════════════════════════
   11. SCROLL-TO-TOP BUTTON
   ══════════════════════════════════════════════════════════ */
#pageup {
    border-radius: 50% !important;
}

/* ══════════════════════════════════════════════════════════
   12. MISC  — progress bars, tooltips, pagination
   ══════════════════════════════════════════════════════════ */
.progress,
.progress-bar {
    border-radius: var(--rn-r-pill) !important;
}

.tooltip-inner {
    border-radius: var(--rn-r-sm) !important;
}

.pagination .page-link {
    border-radius: var(--rn-r-sm) !important;
}

.k-pager-numbers .k-link,
.k-pager-numbers .k-state-selected {
    border-radius: var(--rn-r-sm) !important;
}

/* ══════════════════════════════════════════════════════════
   13. IMAGE THUMBNAILS  (company/user avatars)
   ══════════════════════════════════════════════════════════ */
.img-thumbnail,
.avatar,
.company-logo,
.user-avatar {
    border-radius: var(--rn-r-md) !important;
}

/* ══════════════════════════════════════════════════════════
   14. KENDO SPECIFIC  — filter row, sort indicators, etc.
   ══════════════════════════════════════════════════════════ */
.k-filtercell .k-input,
.k-filtercell .k-button,
.k-columnmenu,
.k-grid td:first-child,
.k-grid th:first-child {
    /* intentionally no radius — internal cells stay square */
}

/* Kendo notification */
.k-notification {
    border-radius: var(--rn-r-md) !important;
}

/* ══════════════════════════════════════════════════════════
   15. SEMANTIC UI  (used in this project)
   ══════════════════════════════════════════════════════════ */
.ui.card,
.ui.cards > .card {
    border-radius: var(--rn-r-lg) !important;
}

.ui.button,
.ui.buttons .button {
    border-radius: var(--rn-r-pill) !important;
}

.ui.input input,
.ui.form input,
.ui.form textarea,
.ui.form select {
    border-radius: var(--rn-r-md) !important;
}

.ui.modal {
    border-radius: var(--rn-r-lg) !important;
}

.ui.label,
.ui.labels .label {
    border-radius: var(--rn-r-sm) !important;
}

/* ══════════════════════════════════════════════════════════
   16.  INLINE STYLE OVERRIDES
        Some elements set border-radius via inline style=""
        The !important on each rule above already covers most,
        but this catches any remaining edge cases.
   ══════════════════════════════════════════════════════════ */
[style*="border-radius: 0"],
[style*="border-radius:0"] {
    /* leave truly intentional 0-radius items alone */
}

/* ══════════════════════════════════════════════════════════
   17.  COMPANIES PAGE  (/Companies)
        Every square element identified in Companies.cshtml.
        Uses high-specificity selectors to win over inline
        style="border-radius:4px" and theme defaults.
   ══════════════════════════════════════════════════════════ */

/* ── Title / breadcrumb bar ── */
.title-bar {
    border-radius: 0 0 var(--rn-r-xl) var(--rn-r-xl) !important;
    overflow: hidden;
}

/* ── Left filter panel (the whole white box) ── */
.browser-job-filters {
    border-radius: var(--rn-r-lg) !important;
    overflow: hidden;
}

/* ── Filter panel header row ── */
.filter-heading {
    border-radius: var(--rn-r-lg) var(--rn-r-lg) 0 0 !important;
}

/* ── Each filter group block ── */
.fltr-group {
    border-radius: var(--rn-r-md) !important;
}

    /* ── Company name text input (has hardcoded inline border-radius:4px) ──
   Attribute selector beats inline styles when combined with !important  */
    #companyNameInput,
    .fltr-group input[type="text"],
    .fltr-group .form-control {
        border-radius: var(--rn-r-md) !important;
    }

/* ── Semantic UI dropdowns inside filter panel ── */
.browser-job-filters .ui.dropdown,
.browser-job-filters .ui.selection.dropdown,
#industryDropdown,
#regionDropdown {
    border-radius: var(--rn-r-md) !important;
}

    /* ── Dropdown menu popup ── */
    .browser-job-filters .ui.dropdown .menu,
    #industryDropdown .menu,
    #regionDropdown .menu {
        border-radius: 0 0 var(--rn-r-md) var(--rn-r-md) !important;
        overflow: hidden;
    }

/* ── Apply filter button ── */
.flr-btn,
.filter-button button,
#applyFilterBtn {
    border-radius: var(--rn-r-pill) !important;
}

/* ── Sort dropdown (مرتب سازی) ── */
.sort-dropdown,
.mtab-right .ui.dropdown {
    border-radius: var(--rn-r-md) !important;
}

    .sort-dropdown .menu,
    .mtab-right .ui.dropdown .menu {
        border-radius: 0 0 var(--rn-r-md) var(--rn-r-md) !important;
        overflow: hidden;
    }

/* ── Main tab / results toolbar ── */
.main-tabs {
    border-radius: var(--rn-r-lg) !important;
}

.res-tabs {
    border-radius: var(--rn-r-lg) var(--rn-r-lg) 0 0 !important;
}

/* ── Each company card ── */
.job-item {
    border-radius: var(--rn-r-lg) !important;
    overflow: hidden;
}

    /* ── Company logo image inside card ── */
    .job-item img,
    .job-center-dt img,
    .job-top-dt1 img {
        border-radius: var(--rn-r-md) !important;
    }

/* ── Location / rating strip inside card ── */
.rating-location {
    border-radius: 0 !important; /* intentionally flat — it's a middle row */
}

/* ── "نمایش پروفایل" link-button inside card ── */
.link-j1,
.job-buttons .link-btn a,
.cpy-btn a {
    border-radius: var(--rn-r-pill) !important;
    display: inline-block;
}

/* ── job-buttons bottom bar of the card ── */
.job-buttons {
    border-radius: 0 0 var(--rn-r-lg) var(--rn-r-lg) !important;
}

/* ── "حذف" clear-filter links — keep as pill for clarity ── */
.clear-single,
.fh-right a {
    border-radius: var(--rn-r-pill) !important;
}

/* ══════════════════════════════════════════════════════════
   18.  FORCE-OVERRIDE any element with an inline
        border-radius that contradicts the design system.
        CSS cannot directly override inline styles, but
        !important on the named selector (#id / .class)
        is sufficient for every case in this project.
   ══════════════════════════════════════════════════════════ */
/* Catches the specific inline style="border-radius:4px; ..."
   on #companyNameInput in Companies.cshtml line 48          */
input#companyNameInput[style] {
    border-radius: var(--rn-r-md) !important;
}

/* ══════════════════════════════════════════════════════════
   19.  CHALLENGES PAGE  (/Challenges)
        Shares most selectors with §17 (Companies page).
        Only Challenges-specific elements are added here.
   ══════════════════════════════════════════════════════════ */

/* ── Deadline badge (مهلت) top-right of each card ── */
.job-fp {
    border-radius: var(--rn-r-pill) !important;
}

/* ── Skill tags inside card (.job-skills a) ── */
.job-skills a,
.job-skills > a {
    border-radius: var(--rn-r-pill) !important;
    display: inline-block;
}

/* ── Grid / List view toggle buttons ── */
.gl-btn,
#grid,
#list {
    border-radius: var(--rn-r-sm) !important;
}

/* ── Challenge card header strip (company logo + info) ── */
.job-top-dt {
    border-radius: var(--rn-r-lg) var(--rn-r-lg) 0 0 !important;
    overflow: hidden;
}

    /* ── Company logo inside challenge card ── */
    .job-left-dt img,
    .job-top-dt img {
        border-radius: var(--rn-r-md) !important;
    }

/* ── Description section middle strip ── */
.job-des-dt {
    border-radius: 0 !important; /* intentionally flat — middle row */
}

/* ── Override inline style="border-radius:4px" on
   #companyNameInput in Challenges.cshtml (same pattern as
   Companies.cshtml — selector wins over inline style) ── */
input#companyNameInput[style] {
    border-radius: var(--rn-r-md) !important;
}
