/* global.css - Matches Original BA Intranet Global Styles */

/* Basic Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
  
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    padding-top: 0;
    padding-left: 300px;
}

/* Spacer element - hidden when using sidebar */
.spacer {
    display: none;
}

/* Header & Footer Base Styles */
footer {
    width: 100%;
    text-align: center;
    padding: 10px;
    margin-left: -300px;
    padding-left: 300px;
}

/* Legacy header styles - hidden when using sidebar */
header {
    display: none;
}

/* Header Button Styling - Complete Specifications */
/* Base Button */
.btn {
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

/* Logout Button Specific */
.logout-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Hover Effects */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    color: white;
}

/* Active State */
.btn:active {
    transform: translateY(0);
}

/* Responsive Behavior */
@media (max-width: 768px) {
    .btn {
        padding: 6px 12px;
    }
    
    .logout-btn {
        padding: 6px 12px;
    }
}

/* Navigation Styles */
nav {
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

nav a {
    color: var(--main-color);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: rgba(0, 51, 102, 0.1);
}

/* Button Styles */
button {
    background-color: var(--main-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--main-color-dark);
    transform: translateY(-1px);
}

/* Active button state */
.btn.active,
.btn-primary.active,
.btn-outline-primary.active,
.btn-secondary.active,
.btn-outline-secondary.active,
.btn-success.active,
.btn-outline-success.active,
.btn-info.active,
.btn-outline-info.active,
.btn-warning.active,
.btn-outline-warning.active,
.btn-danger.active,
.btn-outline-danger.active {
    background-color: var(--main-color);
    color: white;
    border-color: var(--main-color);
}

/* Button groups */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th {
    background-color: var(--main-color);
    color: white;
    padding: 12px;
    text-align: left;
}

/* Table header sort links should stay visible on dark header */
th a,
th a:visited {
    color: inherit;
}

th a:hover,
th a:focus {
    color: inherit;
    text-decoration: underline;
}

/* Sort arrow indicator next to sortable column */
.sort-arrow {
    margin-left: 6px;
    opacity: 0.9;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background-color: rgba(0, 51, 102, 0.05);
}

footer {
    background: linear-gradient(135deg, var(--footer-gradient-start), var(--footer-gradient-end));
    color: #333;
    padding: 20px;
    margin-top: 20px;
}

/* Input Styles */
input, select, textarea {
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--main-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.1);
}

/* Section Headers */
h1, h2, h3, h4, h5, h6 {
    text-align: left;
    font-weight: 500;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    color: var(--main-color);
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
    color: #000000 !important;
}

/* Override section header colors specifically */
.section-header h3,
.form-section h3,
.editable-section h3 {
    color: #000000 !important;
}

/* Main Container - Centered in remaining space after sidebar */
.main-container {
    width: auto;
    max-width: none;
    margin: 0;
    /* Reduce horizontal whitespace between sidebar/content and right edge */
    padding: 28px 36px 0 36px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-container {
        width: 95%;
        padding: 20px 10px 0 10px;
    }
}

/* Links */
a {
    color: var(--main-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--main-color-dark);
}

/* Listing specific buttons */
.new-listing-button {
    background-color: var(--main-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px 0;
}

.new-listing-button:hover {
    background-color: var(--main-color-dark);
    transform: translateY(-1px);
}

/* Button class that uses the button-color variable */
.btn-listings {
    background-color: var(--button-color);
    border-color: var(--button-color);
    color: white;
}

.btn-listings:hover {
    background-color: var(--main-color-dark);
    border-color: var(--main-color-dark);
    color: white;
}

.btn-listings:focus, .btn-listings:active {
    background-color: #001a33;
    border-color: #001a33;
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(0, 51, 102, 0.5);
}

/* Clickable rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: rgba(0, 51, 102, 0.05) !important;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: var(--status-active);
    color: white;
}

.status-pending {
    background-color: var(--status-pending);
    color: black;
}

.status-leased {
    background-color: var(--status-leased);
    color: white;
}

/* Dashboard stats cards */
.stats-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    border-left: 4px solid var(--main-color);
}

.stats-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.stats-card-link:hover {
    transform: translateY(-2px);
}

.stats-card-link:hover .stats-card {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* Pending stats card styling */
.stats-card-pending {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px dashed #adb5bd;
    cursor: help;
}

.stats-card-pending:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--main-color);
    display: block;
}

.stats-label {
    color: #000000;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--main-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sidebar responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-left: 0;
    }
    
    footer {
        margin-left: 0;
        padding-left: 10px;
    }
} 

/* =========================
   Detail Page Styles (Blue Atlas)
   ========================= */
.detail-page {
    width: 100%;
}

.detail-breadcrumb {
    font-size: 13px;
    margin: 0 10px 10px 10px;
    color: #6c757d;
}

.detail-breadcrumb a {
    color: var(--main-color);
    font-weight: 600;
}

.detail-card {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.detail-card:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-header {
    background: var(--main-color);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-header .detail-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    color: #ffffff;
}

.stage-pill {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.detail-header .detail-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.detail-header .btn.dropdown-toggle {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffffff;
}

.detail-header .btn.dropdown-toggle:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
}

.detail-body {
    padding: 30px 18px 18px 18px;
}

.info-section {
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 18px;
    background: transparent;
}

.section-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--main-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.info-rows {
    display: flex;
    flex-direction: column;
}

.info-item-row {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #f0f2f4;
}

.info-item-row:first-child {
    border-top: none;
    padding-top: 0;
}

.info-label {
    width: 170px;
    flex: 0 0 170px;
    font-size: 13px;
    font-weight: 800;
    color: #111;
    text-transform: none;
    letter-spacing: 0;
}

.info-value {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    color: #111;
}

/* Summary specific tweaks */
.summary-section .info-item-row {
    border-top: none;
    padding: 6px 0;
}

/* Reference-data style box (used for Appointments) */
.ref-box {
    background: #f3f6fa;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    padding: 12px 14px;
}

.ref-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--main-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-item .ref-label {
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 4px;
}

.ref-item .ref-value {
    font-size: 14px;
    font-weight: 800;
    color: #111;
}

.ref-item .ref-sub {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.detail-page .info-section table {
    margin: 0;
    border-radius: 8px;
}

.detail-page .info-section th {
    background: #f5f7fa;
    color: #111;
}

.detail-page .info-section tr:hover {
    background-color: rgba(0, 51, 102, 0.03);
}

.sidebar-section {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    margin-bottom: 18px;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #111 !important;
    margin-bottom: 10px;
}

.messages-panel {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px 14px;
}

.call-log-form textarea.form-control {
    resize: vertical;
}

.call-note-attachment {
    border: 1px solid #eef2f6;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 10px;
}

.call-note-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 6px;
}

.call-note-text {
    font-size: 13px;
    color: #111;
}

.detail-divider {
    border: 0;
    border-top: 1px solid #e6ebf1;
    margin: 18px 0;
    opacity: 1;
}

.sms-thread {
    padding: 6px 2px 0 2px;
}

.sms-row {
    display: flex;
    margin-bottom: 6px;
}

.sms-row.inbound {
    justify-content: flex-start;
}

.sms-row.outbound {
    justify-content: flex-end;
}

.sms-bubble {
    max-width: 86%;
    padding: 9px 12px;
    border-radius: 18px;
    line-height: 1.35;
    font-size: 14px;
    word-break: break-word;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.sms-bubble.inbound {
    background: #e5e5ea;
    color: #111;
    border-bottom-left-radius: 6px;
}

.sms-bubble.outbound {
    background: #0b93f6;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.sms-text {
    white-space: pre-wrap;
}

.sms-time {
    font-size: 11px;
    color: #6c757d;
    margin: 0 2px 10px 2px;
}

.sms-time.outbound {
    text-align: right;
}

.sms-time.inbound {
    text-align: left;
}

.sms-composer {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #eef2f6;
    padding-top: 10px;
    margin-top: 10px;
}

.sms-composer textarea.form-control {
    resize: none;
}

.quick-actions .btn {
    width: 100%;
    margin-bottom: 8px;
}

/* Timeline styles (for future use on detail pages) */
.timeline {
    position: relative;
    padding-left: 16px;
}

.timeline:before {
    content: "";
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding: 0 0 12px 0;
}

.timeline-marker {
    position: absolute;
    left: -2px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #adb5bd;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #e9ecef;
}

.timeline-item.completed .timeline-marker {
    background: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.timeline-item.active .timeline-marker {
    background: var(--main-color);
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.25);
}

/* Animated attention pointer (for future use on detail pages) */
.attention-pointer {
    position: absolute;
    left: -60px;
    top: 0;
    font-size: 28px;
    color: var(--main-color);
    animation: pointer-bounce 1.2s infinite ease-in-out;
}

@keyframes pointer-bounce {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -4px); }
}

