/**
 * Company Secretary AI - Custom Styles
 */

/* Base styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Card shadows and hover effects */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Dashboard stat cards */
.stat-card {
    border-radius: 10px;
    overflow: hidden;
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .card-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .card-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Task priority indicators */
.priority-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.priority-high {
    background-color: var(--bs-danger);
}

.priority-medium {
    background-color: var(--bs-warning);
}

.priority-low {
    background-color: var(--bs-success);
}

/* Deadline counters */
.deadline-counter {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.deadline-overdue {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
}

.deadline-soon {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    color: var(--bs-warning);
}

.deadline-upcoming {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
}

/* Document styles */
.document-content {
    font-family: 'Times New Roman', Times, serif;
    padding: 2rem;
    background-color: #fff;
    color: #000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
}

.document-preview {
    min-height: 300px;
}

.document-editor textarea {
    min-height: 300px;
    font-family: monospace;
    line-height: 1.5;
}

/* Email conversation styling */
.email-thread {
    margin-bottom: 1.5rem;
}

.email-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.email-message.from-agent {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    margin-left: 2rem;
}

.email-message.from-user {
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
    margin-right: 2rem;
}

.email-header {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.email-content {
    white-space: pre-line;
}

.email-time {
    font-size: 0.8rem;
    color: var(--bs-secondary);
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
}

/* Whitelist badge */
.whitelist-badge {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

.whitelist-badge i {
    margin-right: 0.25rem;
}

/* Compliance calendar */
.compliance-calendar {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.calendar-month {
    padding: 0.5rem;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    font-weight: 600;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    padding: 0.5rem;
    text-align: center;
    position: relative;
    min-height: 60px;
}

.calendar-day-header {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.calendar-day.has-events::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--bs-primary);
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .dashboard-stat {
        margin-bottom: 1rem;
    }
    
    .email-message.from-agent,
    .email-message.from-user {
        margin-left: 0;
        margin-right: 0;
    }
    
    .calendar-days {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Dark theme specific adjustments */
[data-bs-theme="dark"] .document-content {
    background-color: var(--bs-dark);
    color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
}

/* Loading indicators */
.loading-spinner {
    width: 3rem;
    height: 3rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* API documentation styles */
.api-endpoint {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.api-method {
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-right: 0.5rem;
}

.api-method.get {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
}

.api-method.post {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.api-method.put {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    color: var(--bs-warning);
}

.api-method.delete {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
}

/* Custom scrollbar for code blocks */
pre {
    max-height: 400px;
    overflow-y: auto;
}

pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: rgba(var(--bs-dark-rgb), 0.1);
}

pre::-webkit-scrollbar-thumb {
    background-color: rgba(var(--bs-secondary-rgb), 0.5);
    border-radius: 4px;
}
