/**
 * Fleet Property Popup Styles
 * InfoWindow-based property info & geofence editing popup for the fleet map.
 */

/* ── Fix Google Maps InfoWindow default padding (systemic) ─────── */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    max-height: none !important;
}

/* Hide Google's default close button and header chrome row */
.gm-style .gm-style-iw-c button.gm-ui-hover-effect {
    display: none !important;
}

.gm-style .gm-style-iw-chr {
    display: none !important;
}

/* Hide the tail/arrow shadow artifacts */
.gm-style .gm-style-iw-tc::after {
    background: rgba(13, 17, 23, 0.98) !important;
}

/* ── Popup Container ─────────────────────────────────────── */
.fleet-prop-popup {
    width: 280px;
    background: rgba(13, 17, 23, 0.98);
    color: #e6edf3;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    border-radius: 10px;
    overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────── */
.fleet-prop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #58a6ff;
    min-height: 36px;
}

.fleet-prop-header-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 8px;
}

.fleet-prop-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.fleet-prop-close:hover {
    color: #fff;
}

/* ── Body (view mode) ────────────────────────────────────── */
.fleet-prop-body {
    padding: 10px 14px 12px;
}

.fleet-prop-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #8b949e;
    line-height: 1.4;
}

.fleet-prop-row:last-child {
    margin-bottom: 0;
}

.fleet-prop-row i {
    color: #8b949e;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 11px;
}

.fleet-prop-row-text {
    flex: 1;
    min-width: 0;
}

.fleet-prop-type-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.fleet-prop-type-label.circle {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.fleet-prop-type-label.polygon {
    background: rgba(136, 87, 255, 0.15);
    color: #a371f7;
}

.fleet-prop-type-label.none {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

/* ── Edit Button ─────────────────────────────────────────── */
.fleet-prop-actions {
    padding: 0 14px 12px;
    display: flex;
    gap: 6px;
}

.fleet-prop-edit-btn {
    flex: 1;
    padding: 7px 12px;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 6px;
    color: #58a6ff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.fleet-prop-edit-btn:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: #58a6ff;
}

.fleet-prop-edit-btn i {
    font-size: 11px;
}

/* ── Edit Mode ───────────────────────────────────────────── */
.fleet-prop-edit-section {
    padding: 0 14px 12px;
}

.fleet-prop-edit-group {
    margin-bottom: 10px;
}

.fleet-prop-edit-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b949e;
    margin-bottom: 4px;
}

.fleet-prop-edit-input {
    width: 100%;
    padding: 6px 10px;
    background: rgba(22, 27, 34, 0.8);
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.fleet-prop-edit-input:focus {
    border-color: #58a6ff;
}

.fleet-prop-edit-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.fleet-prop-save-btn,
.fleet-prop-cancel-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.fleet-prop-save-btn {
    background: #238636;
    color: #fff;
}

.fleet-prop-save-btn:hover {
    background: #2ea043;
}

.fleet-prop-cancel-btn {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

.fleet-prop-cancel-btn:hover {
    background: rgba(139, 148, 158, 0.25);
}

/* ── Geofence Type Buttons ───────────────────────────────── */
.fleet-prop-fence-types {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.fleet-prop-type-btn {
    flex: 1;
    padding: 6px 10px;
    background: rgba(22, 27, 34, 0.8);
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #8b949e;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.fleet-prop-type-btn:hover {
    border-color: #58a6ff;
    color: #e6edf3;
}

.fleet-prop-type-btn.active {
    background: rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
    color: #58a6ff;
}

.fleet-prop-type-btn i {
    font-size: 10px;
}

/* ── Done Button ─────────────────────────────────────────── */
.fleet-prop-done-btn {
    width: 100%;
    padding: 7px 12px;
    background: #238636;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.fleet-prop-done-btn:hover {
    background: #2ea043;
}

/* ── Status Toast ────────────────────────────────────────── */
.fleet-prop-status {
    padding: 4px 14px 8px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.fleet-prop-status.success {
    color: #3fb950;
}

.fleet-prop-status.error {
    color: #f85149;
}

.fleet-prop-status.saving {
    color: #8b949e;
}

/* ── Editing state: geofence highlight ───────────────────── */
/* Applied dynamically by JS — the selected geofence turns orange */
