﻿/* ==========================================================================
   X-Editable Custom Styles for Bootstrap 5 Theme
   ========================================================================== */

/* 1. Styling the clickable text to look like a subtle, actionable link */
.editable-click,
a.editable-click,
a.editable-click:hover {
    text-decoration: none;
    border-bottom: 1px dashed #007bff;
    color: #007bff;
    cursor: pointer;
}

/* 2. Styling empty fields so they stand out */
.editable-empty,
a.editable-empty {
    color: #dc3545;
    font-style: italic;
}

/* 3. Force X-editable inputs to perfectly match Bootstrap 5 Form Controls */
.editable-input input[type="text"],
.editable-input input[type="date"],
.editable-input select,
.editable-input textarea {
    display: block;
    width: 100%;
    min-width: 140px;
    max-width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* Add the standard Bootstrap focus glow */
.editable-input input[type="text"]:focus,
.editable-input input[type="date"]:focus,
.editable-input select:focus,
.editable-input textarea:focus {
    border-color: #86b7fe;
    outline: 0;
}

/* 4. Make the textarea much bigger for internal notes/descriptions */
.editable-input textarea {
    min-width: 300px !important;
    min-height: 150px;
}

/* 5. Force X-editable form wrappers to keep inputs and buttons exactly on the same line */
.editable-inline .control-group > div {
    display: flex;
    align-items: center;
}

/* 6. Ensure buttons are vertically centered with the input and spaced perfectly */
.editable-inline .editable-buttons {
    margin-left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   Profile Table Label Alignment (Used with X-editable forms)
   ========================================================================== */

/* Prevent label wrapping and perfectly auto-size the label columns */
.table-borderless td:first-child {
    white-space: nowrap;
    width: 1%;
    padding-right: 2rem;
}

/* Make inactive tab pills look like floating white cards */
.nav-pills .nav-link {
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.nav-pills .nav-link:not(.active) {
    background-color: #ffffff;
    color: #495057;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.05);
}

/* ==========================================================================
   Activity Timeline (Matter Notes)
   ========================================================================== */
.activity-timeline {
    position: relative;
    padding-left: 45px;
    margin-top: 20px;
}

/* The vertical connecting line */
.activity-timeline::before {
    content: '';
    position: absolute;
    left: 15px; /* Centers the line under the 32px icon */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #eef2f7;
}

/* Individual timeline event wrapper */
.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

/* The circular icon that sits on the line */
.timeline-icon {
    position: absolute;
    left: -45px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 0 0 4px #fff; /* Creates a clean break in the line around the icon */
}

.timeline-content {
    background-color: #ffffff;
    border-radius: 0.35rem;
    transition: box-shadow 0.2s;
}

.timeline-content:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}
