﻿/* ============================================================================
   CRM EDITORS — Shared styles for all custom editor components
   theCRMv2.UI/wwwroot/css/crmeditors.css
   ============================================================================ */

/* === Base editor wrapper === */
.crm-editor {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* === Base input === */
.crm-editor-input {
    width: 100%;
    height: 28px;
    padding: 0 32px 0 8px;
    border: 0.571429px solid #ced4da;
    border-radius: 3px;
    font-size: 0.92rem;
    font-family: inherit;
    color: #212529;
    background-color: #fff;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .crm-editor-input:focus {
        outline: none;
        border-color: var(--tc-color-pk);
        box-shadow: 0 0 0 2px rgba(199, 26, 97, 0.15);
    }

/* === Icon inside input === */
.crm-editor-icon {
    position: absolute;
    right: 8px;
    pointer-events: none;
    color: #6c757d;
    font-size: 0.85rem;
}

/* === Readonly state === */
.crm-editor--readonly .crm-editor-input {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #e9ecef;
}

.crm-editor--readonly .crm-editor-icon {
    color: #adb5bd;
}

/* ============================================================================
   DATE / DATETIME specific
   ============================================================================ */

.crm-datetime-edit .crm-editor-input,
.crm-date-edit .crm-editor-input {
    padding-right: 32px;
    color-scheme: light;
}

/* Hide the native browser calendar icon — we use FA Pro */
.crm-datetime-edit input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.crm-date-edit input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 32px;
    height: 100%;
    cursor: pointer;
}

/* The following allows clicking in any part of the datetime field to popup the date picker. */
/*.crm-datetime-edit input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.crm-date-edit input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}*/
/* === Address lookup (Google Places) dropdown — see crmAddressLookup in theCRMv2.js === */
.crm-address-dropdown {
    position: absolute;
    left: 0;
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
    background-color: #fff;
    border: 0.571429px solid #ced4da;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    font-family: inherit;
    font-size: 0.92rem;
    color: #212529;
}

.crm-address-dropdown-item {
    padding: 6px 8px;
    cursor: pointer;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-address-dropdown-item:hover {
    background-color: rgba(199, 26, 97, 0.08); /* --tc-color-pk tint */
    color: #212529;
}

/* 04/11/2026: PG - fileupload placeholder on a new, unsaved record */
.crm-upload-unsaved {
    color: #6c757d;
    font-size: 0.875rem;
    padding: 6px 0;
}