/* ==========================================================================
   DERTDERMAN — CATEGORY SYSTEM
   --------------------------------------------------------------------------
   01. Shared category chip
   02. Company directory category filter
   03. Company profile complaint filter
   04. Complaint create/edit category cards
   05. Company registration category cards
   06. Public complaint card + detail layout
   07. Same-company related complaints
   08. Public complaint custom category dropdown
   09. Responsive rules
   ========================================================================== */

:root {
    --cat-primary: #317eb5;
    --cat-primary-dark: #174f76;
    --cat-border: #d8e5ee;
    --cat-border-strong: #aac7db;
    --cat-ink: #193d56;
    --cat-muted: #748b9d;
    --cat-soft: #f5f9fc;
    --cat-surface: #ffffff;
    --cat-focus: rgb(49 126 181 / 12%);
}


/* ==========================================================================
   01. SHARED CATEGORY CHIP
   ========================================================================== */

.complaint-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid #d8e7f1;
    border-radius: 999px;
    background: linear-gradient(135deg, #f5faff, #edf6fc);
    color: #37698f;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .015em;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgb(27 78 116 / 4%);
}

.complaint-category-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #4a87b6;
    box-shadow: 0 0 0 3px rgb(74 135 182 / 10%);
}


/* ==========================================================================
   02. COMPANY DIRECTORY CATEGORY FILTER
   Used by /sirketler/. The complaints page uses the custom dropdown below.
   ========================================================================== */

.category-filter {
    position: relative;
    display: block;
    min-width: 235px;
}

.category-filter::before {
    content: "Kategori";
    position: absolute;
    z-index: 2;
    top: 7px;
    left: 16px;
    color: #8095a7;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .1em;
    text-transform: uppercase;
    pointer-events: none;
}

.category-filter select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 20px 44px 7px 15px;
    border: 1px solid #cfdee9;
    border-radius: 11px;
    outline: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23577389' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    color: #203e56;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 11px rgb(24 64 94 / 5%);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.category-filter:hover select {
    border-color: #a9c3d7;
    background-color: #fcfeff;
}

.category-filter:focus-within select {
    border-color: #397cb1;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgb(48 118 171 / 11%), 0 5px 16px rgb(30 78 112 / 6%);
}


/* ==========================================================================
   03. COMPANY PROFILE — COMPLAINT CATEGORY FILTER
   ========================================================================== */

.company-category-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 20px;
    padding: 10px;
    border: 1px solid #dce7ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbfd, #f3f8fb);
}

.company-category-filter label {
    position: relative;
    flex: 1;
    min-width: 0;
}

.company-category-filter select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 44px;
    padding: 9px 42px 9px 13px;
    border: 1px solid #cfdee9;
    border-radius: 9px;
    outline: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23577389' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    color: #294b63;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.company-category-filter select:hover {
    border-color: #abc4d6;
}

.company-category-filter select:focus {
    border-color: #397cb1;
    box-shadow: 0 0 0 4px rgb(48 118 171 / 10%);
}

.company-category-filter button {
    min-height: 44px;
    padding: 9px 17px;
    border: 1px solid #214e76;
    border-radius: 9px;
    background: linear-gradient(135deg, #285f8c, #214e76);
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 13px rgb(33 78 118 / 15%);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.company-category-filter button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgb(33 78 118 / 18%);
}

.company-category-filter button:active {
    transform: translateY(0);
}


/* ==========================================================================
   04. COMPLAINT CREATE / EDIT — CATEGORY CARDS
   ========================================================================== */

.complaint-create-form #id_category {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 10px;
    width: 100%;
    margin: 4px 0 0;
    padding: 0;
}

.complaint-create-form #id_category > div {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.complaint-create-form #id_category label {
    position: relative;
    display: flex;
    min-height: 68px;
    align-items: center;
    padding: 13px 42px 13px 46px;
    overflow: hidden;
    border: 1px solid #dce6ed;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff 0%, #f8fbfd 100%);
    color: #344f64;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: 0 3px 10px rgb(20 60 90 / 3%);
    transition:
        border-color .17s ease,
        background .17s ease,
        box-shadow .17s ease,
        transform .17s ease,
        color .17s ease;
}

.complaint-create-form #id_category label::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    border: 2px solid #b8cbd9;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.complaint-create-form #id_category input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.complaint-create-form #id_category label:hover {
    transform: translateY(-2px);
    border-color: #abc5d8;
    background: linear-gradient(145deg, #fff, #f2f8fc);
    color: #254b67;
    box-shadow: 0 8px 20px rgb(25 69 99 / 7%);
}

.complaint-create-form #id_category label:hover::before {
    border-color: #689bc0;
}

.complaint-create-form #id_category label:focus-within {
    outline: 3px solid rgb(40 115 170 / 15%);
    outline-offset: 2px;
}

.complaint-create-form #id_category label:has(input[type="radio"]:checked) {
    border-color: #4d8db9;
    background: linear-gradient(135deg, #edf7fd 0%, #f7fbfe 100%);
    color: #174f76;
    box-shadow:
        inset 0 0 0 1px rgb(49 126 181 / 12%),
        0 8px 22px rgb(35 104 153 / 9%);
}

.complaint-create-form #id_category label:has(input[type="radio"]:checked)::before {
    border-color: #317eb5;
    background: #317eb5;
    box-shadow:
        inset 0 0 0 4px #fff,
        0 0 0 4px rgb(49 126 181 / 10%);
}

.complaint-create-form #id_category label:has(input[type="radio"]:checked)::after {
    content: "✓";
    position: absolute;
    top: 9px;
    right: 9px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 7px;
    background: #317eb5;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 3px 8px rgb(49 126 181 / 20%);
}

.complaint-create-form .account-field:has(#id_category) .field-error {
    margin-top: 8px;
}


/* ==========================================================================
   05. COMPANY REGISTRATION — CATEGORY CARDS
   ========================================================================== */

.ax-company-register .account-field:has(#id_category) {
    gap: 10px;
}

.ax-company-register #id_category {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
    margin: 2px 0 0;
    padding: 0;
}

.ax-company-register #id_category > div {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.ax-company-register #id_category label {
    position: relative;
    display: flex;
    min-height: 58px;
    align-items: center;
    padding: 11px 38px 11px 42px;
    overflow: hidden;
    border: 1px solid #d9e4ec;
    border-radius: 11px;
    background: linear-gradient(145deg, #fff 0%, #f8fbfd 100%);
    color: #304d64;
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: 0 2px 8px rgb(20 60 90 / 3%);
    transition:
        transform .16s ease,
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease,
        color .16s ease;
}

.ax-company-register #id_category label::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    border: 2px solid #b8cad8;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.ax-company-register #id_category input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.ax-company-register #id_category label:hover {
    transform: translateY(-1px);
    border-color: #9fbed3;
    background: linear-gradient(145deg, #fff, #f0f7fb);
    color: #244b68;
    box-shadow: 0 6px 16px rgb(26 72 104 / 7%);
}

.ax-company-register #id_category label:hover::before {
    border-color: #608fb2;
}

.ax-company-register #id_category label:focus-within {
    outline: 3px solid rgb(40 108 157 / 14%);
    outline-offset: 2px;
}

.ax-company-register #id_category label:has(input[type="radio"]:checked) {
    border-color: #427da6;
    background: linear-gradient(135deg, #eaf4fa 0%, #f7fbfd 100%);
    color: #174867;
    box-shadow:
        inset 0 0 0 1px rgb(51 113 157 / 10%),
        0 7px 18px rgb(27 82 120 / 9%);
}

.ax-company-register #id_category label:has(input[type="radio"]:checked)::before {
    border-color: #2f719f;
    background: #2f719f;
    box-shadow:
        inset 0 0 0 4px #fff,
        0 0 0 3px rgb(47 113 159 / 10%);
}

.ax-company-register #id_category label:has(input[type="radio"]:checked)::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 6px;
    background: #2f719f;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    box-shadow: 0 3px 8px rgb(47 113 159 / 18%);
}

.ax-company-register .account-field:has(#id_category) .field-help {
    margin-top: 2px;
    color: #697f91;
    font-size: 9.5px;
    line-height: 1.6;
}

.ax-company-register .account-field:has(#id_category) .field-error {
    margin-top: 3px;
}


/* ==========================================================================
   06. PUBLIC COMPLAINT CARD + DETAIL LAYOUT
   ========================================================================== */

.public-card-category-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.complaint-context-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(285px, 330px);
    gap: 18px;
    align-items: start;
}


/* ==========================================================================
   07. SAME-COMPANY RELATED COMPLAINTS
   ========================================================================== */

.related-company-complaints {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid #dce7ef;
    border-radius: 20px;
    background: linear-gradient(155deg, #fff 0%, #f7fbfe 100%);
    box-shadow: 0 12px 32px rgb(25 65 95 / 6%);
}

.related-company-heading {
    position: relative;
    margin-bottom: 18px;
    padding-bottom: 17px;
    border-bottom: 1px solid #e5edf3;
}

.related-company-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 42px;
    height: 2px;
    border-radius: 999px;
    background: #2d75a8;
}

.related-company-heading p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 7px;
    color: #66869e;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .13em;
}

.related-company-heading p::before {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3d83b5;
    box-shadow: 0 0 0 4px rgb(61 131 181 / 10%);
}

.related-company-heading h2 {
    margin: 0;
    color: #173b55;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -.025em;
}

.related-company-list {
    display: grid;
    gap: 10px;
}

.related-complaint-card {
    position: relative;
    display: grid;
    gap: 9px;
    padding: 14px 15px;
    border: 1px solid #e0e9f0;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgb(25 63 92 / 3%);
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        background-color .16s ease;
}

.related-complaint-card:hover {
    transform: translateY(-2px);
    border-color: #aac7db;
    background: #fcfeff;
    box-shadow: 0 10px 24px rgb(28 74 105 / 8%);
    text-decoration: none !important;
}

.related-company-complaints .complaint-category-chip {
    min-height: 24px;
    padding: 5px 8px;
    border-radius: 7px;
    background: #eef7fc;
    color: #3a7198;
    font-size: 9px;
    letter-spacing: .02em;
    box-shadow: none;
}

.related-company-complaints .complaint-category-chip::before {
    display: none;
}

.related-complaint-card h3 {
    margin: 0;
    color: #193b54;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -.015em;
}

.related-complaint-card:hover h3 {
    color: #1f6698;
}

.related-complaint-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid #edf2f6;
    color: #8193a2;
    font-size: 9px;
    font-weight: 650;
}

.related-complaint-card footer time {
    color: #7a8d9d;
}

.related-complaint-card footer span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf7f1;
    color: #39745b;
    font-size: 8px;
    font-weight: 800;
}

.related-complaint-card footer span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4c9a73;
}

.related-company-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #d5e4ee;
    border-radius: 11px;
    background: linear-gradient(135deg, #f3f9fd, #edf6fb);
    color: #296991 !important;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.4;
    text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.related-company-all:hover {
    transform: translateY(-1px);
    border-color: #adc9da;
    background: linear-gradient(135deg, #eaf5fb, #e5f2f9);
    color: #174f77 !important;
    text-decoration: none !important;
}

.related-company-complaints .public-empty-note {
    margin: 0;
    padding: 16px;
    border: 1px dashed #d5e1e9;
    border-radius: 12px;
    background: #fafcfd;
    color: #748998;
    font-size: 11px;
    line-height: 1.65;
    text-align: center;
}


/* ==========================================================================
   08. PUBLIC COMPLAINTS — CUSTOM CATEGORY DROPDOWN
   ========================================================================== */

.complaints-index .public-complaint-tools {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    overflow: visible;
    border: 1px solid #d6e4ee;
    border-radius: 17px;
    background: linear-gradient(135deg, #fff, #f8fbfd);
    box-shadow: 0 12px 34px rgb(20 59 88 / 5%);
}

.complaint-category-select {
    position: relative;
    z-index: 20;
    min-width: 0;
}

.complaint-category-trigger {
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 13px 7px 15px;
    border: 1px solid #cedee9;
    border-radius: 12px;
    outline: 0;
    background: #fff;
    color: #1f4058;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 3px 10px rgb(23 61 89 / 4%);
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease,
        background-color .16s ease;
}

.complaint-category-trigger:hover {
    border-color: #9fbfd4;
    background: #fcfeff;
    box-shadow: 0 6px 16px rgb(25 68 99 / 7%);
}

.complaint-category-trigger:focus-visible,
.complaint-category-select.is-open .complaint-category-trigger {
    border-color: #3c7faf;
    box-shadow:
        0 0 0 3px rgb(47 119 171 / 11%),
        0 6px 18px rgb(25 68 99 / 7%);
}

.complaint-category-trigger-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
    text-align: left;
}

.complaint-category-trigger-copy small {
    color: #7a91a3;
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.complaint-category-trigger-copy strong {
    overflow: hidden;
    color: #193d56;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.complaint-category-chevron {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 8px;
    background: #f0f6fa;
    color: #52738b;
    transition: transform .18s ease, background-color .18s ease;
}

.complaint-category-chevron svg {
    width: 17px;
    height: 17px;
}

.complaint-category-select.is-open .complaint-category-chevron {
    transform: rotate(180deg);
    background: #e6f2f9;
    color: #286b99;
}

.complaint-category-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 9px);
    right: 0;
    width: min(390px, calc(100vw - 32px));
    padding: 12px;
    overflow: hidden;
    border: 1px solid #d4e2ec;
    border-radius: 16px;
    background: #fff;
    box-shadow:
        0 20px 55px rgb(13 45 69 / 16%),
        0 4px 14px rgb(13 45 69 / 7%);
}

.complaint-category-menu[hidden] {
    display: none !important;
}

.complaint-category-menu-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 3px 11px;
}

.complaint-category-menu-head > div {
    display: grid;
    gap: 4px;
}

.complaint-category-menu-kicker {
    color: #62829a;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .13em;
}

.complaint-category-menu-head strong {
    color: #173b54;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
}

.complaint-category-count {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid #dce8ef;
    border-radius: 999px;
    background: #f5f9fc;
    color: #6a8294;
    font-size: 8px;
    font-weight: 750;
    white-space: nowrap;
}

.complaint-category-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #d6e3ec;
    border-radius: 10px;
    background: #f8fbfd;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.complaint-category-search:focus-within {
    border-color: #5590b8;
    background: #fff;
    box-shadow: 0 0 0 3px rgb(60 127 175 / 9%);
}

.complaint-category-search-icon {
    display: grid;
    width: 38px;
    place-items: center;
    color: #718b9d;
}

.complaint-category-search-icon .icon {
    width: 15px;
    height: 15px;
}

.complaint-category-search input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 8px 11px 8px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #25475e;
    font-family: inherit;
    font-size: 11px;
}

.complaint-category-search input::placeholder {
    color: #8a9daa;
}

.complaint-category-options {
    display: grid;
    max-height: 320px;
    gap: 5px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: #c4d7e4 transparent;
}

.complaint-category-option {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 24px;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    outline: 0;
    background: transparent;
    color: #294a61;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .14s ease, background-color .14s ease, transform .14s ease;
}

.complaint-category-option:hover {
    transform: translateX(2px);
    border-color: #d5e5ef;
    background: #f5fafd;
}

.complaint-category-option:focus-visible {
    border-color: #6ca0c4;
    background: #f4f9fc;
    box-shadow: inset 0 0 0 1px rgb(70 137 185 / 8%);
}

.complaint-category-option-mark {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: #eef6fb;
}

.complaint-category-option-mark span {
    width: 8px;
    height: 8px;
    border: 2px solid #6c9bbc;
    border-radius: 50%;
    background: #fff;
}

.complaint-category-option-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.complaint-category-option-copy strong {
    overflow: hidden;
    color: #294a61;
    font-size: 10px;
    font-weight: 780;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.complaint-category-option-copy small {
    color: #8496a3;
    font-size: 8px;
    line-height: 1.4;
}

.complaint-category-option-check {
    display: none;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: #2774a8;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}

.complaint-category-option.is-selected {
    border-color: #acd0e5;
    background: linear-gradient(135deg, #eaf6fc, #f5fbfe);
}

.complaint-category-option.is-selected .complaint-category-option-mark {
    background: #dfeff8;
}

.complaint-category-option.is-selected .complaint-category-option-mark span {
    border-color: #2877aa;
    background: #2877aa;
    box-shadow: inset 0 0 0 2px #fff;
}

.complaint-category-option.is-selected .complaint-category-option-copy strong {
    color: #18567e;
}

.complaint-category-option.is-selected .complaint-category-option-check {
    display: grid;
}

.complaint-category-no-result {
    margin: 8px 0 0;
    padding: 18px 12px;
    border: 1px dashed #d5e2ea;
    border-radius: 10px;
    background: #fafcfd;
    color: #7a8e9c;
    font-size: 10px;
    text-align: center;
}

.complaints-index .public-complaint-tools .public-search {
    height: 50px;
    border-radius: 12px;
}

.complaints-index .public-complaint-tools .public-search input {
    min-height: 48px;
}


/* ==========================================================================
   09. RESPONSIVE
   ========================================================================== */

/* Detail layout */
@media (max-width: 980px) {
    .complaint-context-grid {
        grid-template-columns: 1fr;
    }

    .related-company-complaints {
        width: 100%;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .complaint-create-form #id_category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .complaint-create-form #id_category label {
        min-height: 64px;
        padding: 12px 39px 12px 43px;
    }

    .ax-company-register #id_category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ax-company-register #id_category label {
        min-height: 56px;
        padding: 10px 36px 10px 40px;
        font-size: 10px;
    }
}

/* Public complaints: stack search and custom category control */
@media (max-width: 899px) {
    .complaints-index .public-complaint-tools {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .complaint-category-select {
        width: 100%;
    }

    .complaint-category-menu {
        right: auto;
        left: 0;
        width: min(390px, 100%);
    }
}

/* General mobile */
@media (max-width: 760px) {
    .category-filter {
        width: 100%;
        min-width: 0;
    }

    .company-category-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .company-category-filter label,
    .company-category-filter button {
        width: 100%;
    }

    .related-company-complaints {
        padding: 17px;
        border-radius: 16px;
    }

    .related-company-heading h2 {
        font-size: 16px;
    }

    .related-complaint-card {
        padding: 13px;
    }

    .related-complaint-card footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .related-company-all {
        padding: 11px 12px;
    }
}

/* Phone */
@media (max-width: 600px) {
    .complaint-create-form #id_category {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .complaint-create-form #id_category label {
        min-height: 58px;
        padding: 11px 38px 11px 42px;
        border-radius: 12px;
        font-size: 11px;
    }

    .complaint-create-form #id_category label::before {
        left: 14px;
        width: 17px;
        height: 17px;
    }

    .complaint-create-form #id_category label:has(input[type="radio"]:checked)::after {
        top: 50%;
        right: 12px;
        width: 19px;
        height: 19px;
        transform: translateY(-50%);
        border-radius: 50%;
    }

    .ax-company-register #id_category {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .ax-company-register #id_category label {
        min-height: 54px;
        padding: 10px 38px 10px 41px;
        border-radius: 10px;
        font-size: 10.5px;
    }

    .ax-company-register #id_category label::before {
        left: 13px;
        width: 16px;
        height: 16px;
    }

    .ax-company-register #id_category label:has(input[type="radio"]:checked)::after {
        top: 50%;
        right: 11px;
        width: 18px;
        height: 18px;
        transform: translateY(-50%);
        border-radius: 50%;
    }
}

/* Small phone */
@media (max-width: 480px) {
    .complaints-index .public-complaint-tools {
        margin-bottom: 20px;
        padding: 8px;
    }

    .complaints-index .public-complaint-tools .public-search {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .complaints-index .public-complaint-tools .public-search .icon {
        width: 16px;
        height: 16px;
        margin-left: 11px;
    }

    .complaints-index .public-complaint-tools .public-search input {
        min-width: 0;
        padding-inline: 9px;
        font-size: 12px;
    }

    .complaints-index .public-complaint-tools .public-search button {
        min-width: 54px;
        padding-inline: 12px;
        font-size: 11px;
    }

    .complaint-category-trigger {
        height: 52px;
    }

    .complaint-category-menu {
        width: 100%;
        padding: 10px;
        border-radius: 14px;
    }

    .complaint-category-menu-head {
        padding-bottom: 9px;
    }

    .complaint-category-options {
        max-height: min(330px, 48vh);
    }

    .complaint-category-option {
        grid-template-columns: 27px minmax(0, 1fr) 22px;
        min-height: 50px;
        gap: 8px;
    }

    .complaint-category-option-copy strong {
        font-size: 10.5px;
    }

    .complaint-category-count {
        display: none;
    }
}

/* Very small phone */
@media (max-width: 380px) {
    .complaint-create-form #id_category label {
        min-height: 56px;
        padding: 10px 36px 10px 40px;
        font-size: 10.5px;
    }

    .related-company-complaints {
        padding: 14px;
    }

    .related-company-heading h2 {
        font-size: 15px;
    }
}
/* =========================================================
   COMPANY DIRECTORY — CATEGORY FILTER
   ========================================================= */

.directory-page .company-directory-search {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        minmax(220px, 270px)
        auto
        auto;
    max-width: 820px;
    gap: 9px;
    align-items: center;
}

.directory-page .company-directory-search .discovery-search-box {
    width: 100%;
}

.directory-page .company-directory-search .discovery-search-box input,
.directory-page .company-category-select .complaint-category-trigger {
    height: 48px;
}

.directory-page .company-category-select {
    width: 100%;
    min-width: 0;
}

.directory-page .company-category-select .complaint-category-menu {
    width: min(390px, calc(100vw - 32px));
}

.directory-page .company-directory-search-submit {
    min-width: 64px;
    height: 48px;
    padding-inline: 18px;
}

.directory-page .company-directory-search .discovery-search-clear {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding-inline: 10px;
    white-space: nowrap;
}


/* Tablet */

@media (max-width: 1050px) {

    .directory-page .company-directory-search {
        grid-template-columns:
            minmax(200px, 1fr)
            minmax(200px, 240px)
            auto;
        max-width: 720px;
    }

    .directory-page
    .company-directory-search
    .discovery-search-clear {
        grid-column: 1 / -1;
        justify-self: start;
        min-height: auto;
        padding: 3px 4px;
    }

}


/* Mobile */

@media (max-width: 767px) {

    .directory-page .company-directory-search {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
        gap: 8px;
    }

    .directory-page .company-category-select {
        width: 100%;
    }

    .directory-page
    .company-category-select
    .complaint-category-trigger {
        width: 100%;
        height: 52px;
    }

    .directory-page
    .company-category-select
    .complaint-category-menu {
        right: auto;
        left: 0;
        width: 100%;
    }

    .directory-page
    .company-directory-search-submit {
        width: 100%;
        height: 48px;
    }

    .directory-page
    .company-directory-search
    .discovery-search-clear {
        justify-self: center;
    }

}

/* =========================================================
   COMPANY DIRECTORY — LIGHT CATEGORY THEME
   Sadece /sirketler/ sayfası
   ========================================================= */

.directory-page
.company-category-select
.complaint-category-trigger {
    border-color: #d9e6ef;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7fbfe 100%
        );

    color: #31546d;

    box-shadow:
        0 4px 14px
        rgb(45 92 125 / 5%);
}


.directory-page
.company-category-select
.complaint-category-trigger:hover {
    border-color: #b9d2e2;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f2f8fc
        );

    box-shadow:
        0 7px 18px
        rgb(45 92 125 / 7%);
}


.directory-page
.company-category-select.is-open
.complaint-category-trigger,
.directory-page
.company-category-select
.complaint-category-trigger:focus-visible {
    border-color: #8eb9d4;

    box-shadow:
        0 0 0 3px
        rgb(106 165 204 / 10%),
        0 7px 18px
        rgb(45 92 125 / 7%);
}


/* Başlık */

.directory-page
.company-category-select
.complaint-category-trigger-copy small {
    color: #8aa0b0;
}


.directory-page
.company-category-select
.complaint-category-trigger-copy strong {
    color: #355b74;
}


/* Sağ ok */

.directory-page
.company-category-select
.complaint-category-chevron {
    background: #eef6fb;

    color: #6f95ad;
}


.directory-page
.company-category-select.is-open
.complaint-category-chevron {
    background: #e3f1f8;

    color: #4f84a5;
}


/* Açılan menü */

.directory-page
.company-category-select
.complaint-category-menu {
    border-color: #dce8f0;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfdff 100%
        );

    box-shadow:
        0 18px 42px
        rgb(53 92 118 / 10%),
        0 4px 12px
        rgb(53 92 118 / 4%);
}


/* Menü başlığı */

.directory-page
.company-category-select
.complaint-category-menu-kicker {
    color: #86a0b1;
}


.directory-page
.company-category-select
.complaint-category-menu-head strong {
    color: #365d76;
}


.directory-page
.company-category-select
.complaint-category-count {
    border-color: #e0ebf2;

    background: #f6fafc;

    color: #8296a5;
}


/* Arama */

.directory-page
.company-category-select
.complaint-category-search {
    border-color: #dde8ef;

    background: #f8fbfd;
}


.directory-page
.company-category-select
.complaint-category-search:focus-within {
    border-color: #9bc0d8;

    background: #ffffff;

    box-shadow:
        0 0 0 3px
        rgb(111 164 198 / 9%);
}


.directory-page
.company-category-select
.complaint-category-search-icon {
    color: #8ba1b0;
}


.directory-page
.company-category-select
.complaint-category-search input {
    color: #41637a;
}


/* Kategori seçenekleri */

.directory-page
.company-category-select
.complaint-category-option {
    color: #45657a;
}


.directory-page
.company-category-select
.complaint-category-option:hover {
    border-color: #dce9f1;

    background: #f7fbfd;

    transform: translateX(2px);
}


.directory-page
.company-category-select
.complaint-category-option:focus-visible {
    border-color: #a6c8dc;

    background: #f7fbfd;
}


/* Sol küçük ikon */

.directory-page
.company-category-select
.complaint-category-option-mark {
    background: #f0f7fb;
}


.directory-page
.company-category-select
.complaint-category-option-mark span {
    border-color: #8fb6ce;

    background: #ffffff;
}


/* Yazılar */

.directory-page
.company-category-select
.complaint-category-option-copy strong {
    color: #46667b;
}


.directory-page
.company-category-select
.complaint-category-option-copy small {
    color: #95a7b3;
}


/* Seçili kategori */

.directory-page
.company-category-select
.complaint-category-option.is-selected {
    border-color: #c4ddea;

    background:
        linear-gradient(
            135deg,
            #f1f8fc 0%,
            #f8fcfe 100%
        );
}


.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-mark {
    background: #e8f4fa;
}


.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-mark span {
    border-color: #6fa2c1;

    background: #6fa2c1;
}


.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-copy strong {
    color: #3f708d;
}


.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-check {
    background: #78a8c5;

    color: #ffffff;
}


/* Ara butonu da daha açık olsun */

.directory-page
.company-directory-search-submit {
    border: 1px solid #b8d2e2;

    background:
        linear-gradient(
            135deg,
            #edf6fb,
            #e3f1f8
        );

    color: #3e6f8c;

    box-shadow:
        0 4px 12px
        rgb(76 124 155 / 8%);
}


.directory-page
.company-directory-search-submit:hover {
    border-color: #9ebfd3;

    background:
        linear-gradient(
            135deg,
            #e7f2f8,
            #dcecf5
        );

    color: #315f7b;
}
/* =========================================================
   COMPANY DIRECTORY — NEUTRAL CATEGORY OPTIONS
   ========================================================= */

.directory-page
.company-category-select
.complaint-category-option {
    border-color: transparent;
    background: #ffffff;
    color: #4f5f6b;
}

.directory-page
.company-category-select
.complaint-category-option:hover {
    border-color: #e1e6ea;
    background: #f7f8f9;
    color: #34434d;
    transform: translateX(2px);
}

.directory-page
.company-category-select
.complaint-category-option:focus-visible {
    border-color: #d2d9de;
    background: #f7f8f9;

    box-shadow:
        0 0 0 3px
        rgb(80 100 115 / 7%);
}


/* Sol küçük kategori ikonu */

.directory-page
.company-category-select
.complaint-category-option-mark {
    background: #f2f4f5;
}

.directory-page
.company-category-select
.complaint-category-option-mark span {
    border-color: #aeb8bf;
    background: #ffffff;
}


/* Kategori isimleri */

.directory-page
.company-category-select
.complaint-category-option-copy strong {
    color: #4d5c66;
}

.directory-page
.company-category-select
.complaint-category-option-copy small {
    color: #9aa4ab;
}


/* Seçili kategori */

.directory-page
.company-category-select
.complaint-category-option.is-selected {
    border-color: #d5e0e6;

    background:
        linear-gradient(
            135deg,
            #f5f8fa,
            #ffffff
        );
}

.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-mark {
    background: #edf1f3;
}

.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-mark span {
    border-color: #718b9c;
    background: #718b9c;
}

.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-copy strong {
    color: #344f60;
}


/* Seçili tik */

.directory-page
.company-category-select
.complaint-category-option.is-selected
.complaint-category-option-check {
    background: #7993a3;
    color: #ffffff;
}


/* Menü içindeki arka planı da nötrleştir */

.directory-page
.company-category-select
.complaint-category-menu {
    background: #ffffff;
}

.directory-page
.company-category-select
.complaint-category-options {
    background: #ffffff;
}