/* PropDB SPA — Custom Styles */

/* Card hover transitions */
.property-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Status color left borders */
.status-new              { border-left: 4px solid #3b82f6; }
.status-researching      { border-left: 4px solid #6366f1; }
.status-contacted        { border-left: 4px solid #eab308; }
.status-interested       { border-left: 4px solid #22c55e; }
.status-proposal_sent    { border-left: 4px solid #f97316; }
.status-negotiating      { border-left: 4px solid #ec4899; }
.status-awarded          { border-left: 4px solid #14b8a6; }
.status-skip             { border-left: 4px solid #9ca3af; }
.status-acquired         { border-left: 4px solid #10b981; }
.status-under_management { border-left: 4px solid #059669; }

/* Special card highlights */
.card-mom-pop      { border-left: 4px solid #10b981; }
.card-enriched     { border-left: 4px solid #8b5cf6; }
.card-interested   { border-left: 4px solid #f59e0b; background: linear-gradient(135deg, #fefce8, #fff); }

/* Timeline connector lines */
.timeline-item {
    position: relative;
    padding-left: 2rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 1.75rem;
    bottom: -1.5rem;
    width: 2px;
    background: #e5e7eb;
}
.timeline-item:last-child::before {
    display: none;
}
.timeline-dot {
    position: absolute;
    left: 0.15rem;
    top: 0.35rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Timeline type colors */
.timeline-dot.type-call    { background: #3b82f6; }
.timeline-dot.type-email   { background: #8b5cf6; }
.timeline-dot.type-meeting { background: #10b981; }
.timeline-dot.type-note    { background: #6b7280; }
.timeline-dot.type-letter  { background: #f59e0b; }
.timeline-dot.type-sms     { background: #ec4899; }

/* Active nav link */
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Badge base */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25rem;
}

/* Status badges */
.badge-new              { background: #dbeafe; color: #1d4ed8; }
.badge-researching      { background: #e0e7ff; color: #4338ca; }
.badge-contacted        { background: #fef3c7; color: #92400e; }
.badge-interested       { background: #dcfce7; color: #166534; }
.badge-proposal_sent    { background: #ffedd5; color: #9a3412; }
.badge-negotiating      { background: #fce7f3; color: #9d174d; }
.badge-awarded          { background: #ccfbf1; color: #115e59; }
.badge-skip             { background: #f3f4f6; color: #4b5563; }
.badge-acquired         { background: #d1fae5; color: #065f46; }
.badge-under_management { background: #a7f3d0; color: #064e3b; }

/* Capital pipeline status badges */
.badge-meeting_scheduled  { background: #e0f2fe; color: #075985; }
.badge-active_discussion  { background: #fef3c7; color: #92400e; }
.badge-committed          { background: #d1fae5; color: #065f46; }
.badge-funded             { background: #a7f3d0; color: #064e3b; }
.badge-passed             { background: #f3f4f6; color: #4b5563; }

/* Priority stars */
.priority-stars {
    color: #f59e0b;
    letter-spacing: 1px;
}

/* Pipeline column */
.pipeline-col {
    min-height: 200px;
}
.pipeline-col-header {
    position: sticky;
    top: 4rem;
    z-index: 10;
}

/* Stat card */
.stat-card {
    transition: transform 0.15s ease;
}
.stat-card:hover {
    transform: translateY(-1px);
}

/* Detail info grid rows */
.info-row {
    display: flex;
    padding: 0.375rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    width: 10rem;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: #6b7280;
}
.info-value {
    font-size: 0.875rem;
    color: #111827;
}

/* Document table */
.doc-table {
    width: 100%;
    border-collapse: collapse;
}
.doc-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}
.doc-table td {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
}
.doc-table tr:hover td {
    background: #f9fafb;
}

/* Research log */
.log-entry {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.log-entry:last-child {
    border-bottom: none;
}

/* Fixed-width badge in log entries */
.log-entry .log-badge {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Note entries */
.note-entry {
    transition: box-shadow 0.15s ease;
}
.note-entry:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Note form */
.note-form textarea {
    resize: vertical;
    min-height: 4rem;
}

/* Audit trail toggle */
.audit-chevron {
    transition: transform 0.15s ease;
}
.audit-chevron.rotate-90 {
    transform: rotate(90deg);
}

/* Owner card */
.owner-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: border-color 0.15s ease;
}
.owner-card:hover {
    border-color: #93c5fd;
}

/* Responsive */
@media (max-width: 640px) {
    .info-row {
        flex-direction: column;
    }
    .info-label {
        width: auto;
        margin-bottom: 0.125rem;
    }
}

/* Photo grid */
.photo-item {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.photo-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.photo-item img {
    transition: opacity 0.3s ease;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}
.empty-state svg {
    margin: 0 auto 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    opacity: 0.5;
}

/* Notes markdown styling */
.notes-content h1, .notes-content h2, .notes-content h3,
.notes-content h4, .notes-content h5, .notes-content h6 {
    font-weight: 600;
    color: #1f2937;
    margin-top: 1em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}
.notes-content h1 { font-size: 1.25rem; }
.notes-content h2 { font-size: 1.125rem; }
.notes-content h3 { font-size: 1rem; }
.notes-content p {
    margin-bottom: 0.5em;
}
.notes-content p:last-child {
    margin-bottom: 0;
}
.notes-content strong {
    font-weight: 600;
    color: #1f2937;
}
.notes-content em {
    font-style: italic;
}
.notes-content a {
    color: #2563eb;
    text-decoration: underline;
}
.notes-content a:hover {
    color: #1d4ed8;
}
.notes-content ul, .notes-content ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}
.notes-content ul { list-style: disc; }
.notes-content ol { list-style: decimal; }
.notes-content li {
    margin-bottom: 0.25em;
}
.notes-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    font-family: ui-monospace, monospace;
}
.notes-content pre {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 0.5em 0;
}
.notes-content pre code {
    background: none;
    padding: 0;
}
.notes-content blockquote {
    border-left: 3px solid #d1d5db;
    padding-left: 0.75rem;
    color: #6b7280;
    margin: 0.5em 0;
}
.notes-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0.75em 0;
}
