/* =======================================================
   ui-2026.css — Shared design-system classes (2026)
   Used by: ניהול חתימות, ניהול משתמשים, and future screens
   ======================================================= */


/* ---------- Filter Card ----------
   Add .ui2-filter-card to the filter strip wrapper of any
   screen that should use the modern card treatment.
   -------------------------------------------------------- */

.ui2-filter-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 4px 11px;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.06);
}

/* Reset the default ui-control margins inside the card */
.ui2-filter-card .ui-control {
    margin: 0;
    color: #111;
    font-size: 16px;
}

.ui2-filter-card .ui-input label,
.ui2-filter-card .ui-select label {
    display: block;
}

/* Gray pill inputs / selects */
body .ui2-filter-card .ui-input input,
body .ui2-filter-card .ui-select select {
    background-color: #F6F7F8;
    border: 1px solid lightgray !important;
    border-radius: 8px;
    outline: none;
    margin-top: 7px !important;
}

/* Custom dropdown arrow — arrow on left side for RTL layouts */
.ui2-filter-card .ui-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-left: 1.5em;
    padding-right: 0.5em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 10px 10px;
}

/* Search icon — position the magnifying glass button correctly */
.ui2-filter-card .ui-control .ui-search .ui-button {
    top: 14px;
}

/* ---------- Table ----------
   Add .ui2-table to the .table-control wrapper for the modern 40px header.
   -------------------------------------------------------- */

.ui2-table .headers {
    height: 40px;
}

.ui2-table .headers .cell {
    padding-top: 8px;
}

@media (max-width: 1280px) {
    .ui2-table .headers .cell {
        padding-top: 5px;
    }
}


/* ---------- Cube Card Grid ----------
   Add .ui2-card-grid to the container for a responsive
   card grid that adapts from 1→2→3 columns.
   -------------------------------------------------------- */

.ui2-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 4px 2px; /* prevent box-shadow clipping at grid edges */
}

/* Base card tile */
.ui2-cube-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    user-select: none;
}

.ui2-cube-card:hover {
    border-color: rgba(19, 127, 236, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Selected state — inset shadow instead of border so layout doesn't shift */
.ui2-cube-card.is-selected {
    box-shadow: 0 0 0 2px #137fec;
}

/* Check-circle indicator — top-right corner (RTL: opposite the icon square) */
.ui2-cube-card__check {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 22px;
    color: #137fec;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.ui2-cube-card.is-selected .ui2-cube-card__check {
    opacity: 1;
}

/* Head row — icon anchored to the left (RTL: flex-end = left) */
.ui2-cube-card__head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

/* Icon square — primary-tinted, single shared style */
.ui2-cube-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(19, 127, 236, 0.1);
    color: #137fec;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ui2-cube-card__icon:hover {
    background: rgba(19, 127, 236, 0.18);
    color: #0d6bd4;
    box-shadow: 0 0 0 4px rgba(19, 127, 236, 0.22);
}

/* Body — fills remaining height so footer stays at bottom */
.ui2-cube-card__body {
    flex: 1;
    margin-bottom: 14px;
}

.ui2-cube-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #111418;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.ui2-cube-card__description {
    font-size: 13px;
    color: #617589;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer — button anchored at the bottom */
.ui2-cube-card__footer {
    border-top: 1px solid #f0f2f4;
    padding-top: 12px;
}

.ui2-cube-card__btn {
    display: block;
    width: 100%;
    height: 36px;
    background: #137fec;
    color: #fff;
    border: 2px solid #137fec;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ui2-cube-card__btn:hover {
    background: #0d6bd4;
    border-color: #0d6bd4;
}

/* Selected — outline style, card ring is the hero */
.ui2-cube-card.is-selected .ui2-cube-card__btn {
    background: transparent;
    color: #137fec;
}

.ui2-cube-card.is-selected .ui2-cube-card__btn:hover {
    background: rgba(19, 127, 236, 0.08);
}


/* ---------- Compact card variant (for narrower containers, e.g. modals) ---------- */

.ui2-cube-card--sm {
    padding: 14px;
}

.ui2-cube-card--sm .ui2-cube-card__head {
    margin-bottom: 10px;
}

.ui2-cube-card--sm .ui2-cube-card__icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.ui2-cube-card--sm .ui2-cube-card__body {
    margin-bottom: 10px;
}

.ui2-cube-card--sm .ui2-cube-card__description {
    display: none;
}

.ui2-cube-card--sm .ui2-cube-card__btn {
    height: 32px;
    font-size: 13px;
}


/* ---------- Modal Card ----------
   Generic card panel for use inside modals.
   -------------------------------------------------------- */

.ui2-modal-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111418;
    font-size: 14px;
}

.ui2-modal-card__icon {
    font-size: 20px;
    color: #137fec;
    flex-shrink: 0;
}

.ui2-modal-card__label {
    font-weight: 600;
    margin-left: 4px;
    color: #617589;
    font-size: 13px;
}

/* Select inside a modal card — same gray/rounded/arrow treatment as filter-card selects */
.ui2-modal-card .ui-select label {
    display: block;
}

body .ui2-modal-card .ui-select select {
    background-color: #F6F7F8;
    border: 1px solid lightgray !important;
    border-radius: 8px;
    outline: none;
    margin-top: 0 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-left: 1.5em;
    padding-right: 0.5em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 10px 10px;
}


/* ---------- Templates card (white card wrapping the create-doc template list) ---------- */

.ui2-templates-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}


/* ---------- Primary action button (modal footer) ---------- */

.ui2-btn-primary {
    background: #137fec;
    color: #fff;
    border: 2px solid #137fec;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.5;
}

.ui2-btn-primary:hover:not([disabled]) {
    background: #0d6bd4;
    border-color: #0d6bd4;
}

.ui2-btn-primary[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}


/* ---------- Template rows (inside create-document modal) ---------- */

.ui2-modal-template-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f4;
}

.ui2-modal-template-row:last-child {
    border-bottom: none;
}

.ui2-modal-template-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: rgba(19, 127, 236, 0.1);
    color: #137fec;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.ui2-modal-template-name {
    flex: 1;
    font-size: 14px;
    color: #111418;
    font-weight: 500;
}

.ui2-modal-template-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}


/* ---------- Status Pills ----------
   Replace Bootstrap .label classes in document-create modal.
   -------------------------------------------------------- */

.ui2-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ui2-status-pill--pending {
    background: #f3f4f6;
    color: #6b7280;
}

.ui2-status-pill--processing {
    background: #fef3c7;
    color: #92400e;
}

.ui2-status-pill--success {
    background: #d1fae5;
    color: #065f46;
}

.ui2-status-pill--failed {
    background: #fee2e2;
    color: #991b1b;
}


/* ---------- Transfer Ownership Modal (inner styles) ---------- */

/* Shared inner card */
.transfer-ownership-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    padding: 14px 20px;
    margin-bottom: 10px;
}

/* Users card — single row, RTL: from-user right, arrow center, to-user left */
.transfer-ownership-users-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    min-height: 100px;
}

.transfer-ownership-user-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.transfer-ownership-user-label {
    display: block;
    font-size: 0.82em;
    color: #888;
    margin-bottom: 4px;
    text-align: center;
}

/* Avatar + text side-by-side */
.transfer-ownership-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.transfer-ownership-user-text {
    line-height: 1.3;
    min-width: 0;
}

.transfer-ownership-user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

/* Arrow — centered between two equal blocks */
.transfer-ownership-arrow {
    color: #ccc;
    font-size: 1.5em;
    flex-shrink: 0;
    margin: 0 16px;
    align-self: center;
    margin-top: 18px;
}

/* Mode radios — transfer all vs pick */
.transfer-ownership-mode-radios {
    padding: 8px 14px 6px;
    direction: rtl;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Destination trigger — clickable contact graphic */
.transfer-ownership-dest-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 6px 4px 2px;
    transition: background 0.15s;
    direction: rtl;
}

.transfer-ownership-dest-trigger:hover {
    background: #f4f6f8;
}

.transfer-ownership-dest-empty {
    background: #e8edf2;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
}

.transfer-ownership-dest-chevron {
    color: #bbb;
    font-size: 0.75em;
    margin-right: auto;
    margin-left: 2px;
    flex-shrink: 0;
}

.transfer-ownership-dest-menu {
    direction: rtl;
    text-align: right;
    max-height: 220px;
    overflow-y: auto;
    min-width: 280px;
}

/* Non-linked reports checkbox */
.transfer-ownership-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    font-weight: normal;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    margin: 0;
    padding: 5px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.transfer-ownership-radio:hover {
    background: #f4f6f8;
}

.transfer-ownership-radio input[type="checkbox"],
.transfer-ownership-radio input[type="radio"] {
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
    position: relative;
    top: -1px;
}

/* Clients table card */
.transfer-ownership-picker-card {
    padding: 0;
    overflow: hidden;
}

.transfer-ownership-clients-section {
    direction: rtl;
}

/* Title row: title + selected counts */
.transfer-ownership-clients-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    direction: rtl;
    padding: 10px 14px 8px;
    border-bottom: 1px solid #eee;
}

.transfer-ownership-clients-title {
    font-weight: 600;
    font-size: 0.95em;
    color: #444;
}

.transfer-ownership-selected-counts {
    font-size: 0.8em;
    color: #2d7dd2;
}

/* Tabs */
.transfer-ownership-tabs {
    display: flex;
    flex-direction: row;
    direction: rtl;
    border-top: 1px solid #eee;
    border-bottom: 2px solid #eee;
}

.transfer-ownership-tab {
    padding: 7px 18px;
    font-size: 0.88em;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.transfer-ownership-tab:hover {
    color: #444;
}

.transfer-ownership-tab.active {
    color: #2d7dd2;
    border-bottom-color: #2d7dd2;
    font-weight: 600;
}

/* Column headers */
.transfer-ownership-clients-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    direction: rtl;
    padding: 5px 12px;
    font-size: 0.82em;
    color: #888;
    font-weight: 600;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.toc-sortable {
    cursor: pointer;
    user-select: none;
}

.toc-sortable:hover {
    color: #555;
}

.toc-sort-inactive {
    opacity: 0.35;
}

/* Client rows */
.transfer-ownership-client-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    direction: rtl;
    padding: 5px 12px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9em;
}

.transfer-ownership-client-row:last-child {
    border-bottom: none;
}

.transfer-ownership-client-row:hover {
    background: #f8fafc;
}

/* Table columns */
.toc-col-check {
    flex-shrink: 0;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-col-check input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    position: relative;
    top: -1px;
}

.toc-col-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
}

.toc-col-type {
    flex-shrink: 0;
    width: 110px;
    font-size: 0.92em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toc-col-id {
    flex-shrink: 0;
    width: 100px;
    font-size: 0.9em;
    direction: ltr;
    text-align: right;
}

/* Scrollable list */
.transfer-ownership-clients-list {
    max-height: 240px;
    overflow-y: auto;
    direction: rtl;
}

/* Truncating name */
.transfer-ownership-item-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-ownership-empty-msg {
    color: #999;
    font-size: 0.88em;
    padding: 10px 0;
    text-align: center;
}

.transfer-ownership-section-divider {
    margin: 0;
    border: none;
    border-top: 1px solid #eee;
}

.transfer-ownership-reports-row {
    padding: 20px 16px 8px;
    direction: rtl;
}
