/* General site styles */

/* Transitions */
a, .btn, .form-control, .form-select, .card {
    transition: all 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Code styles */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Selection */
::selection {
    background: var(--brand-accent);
    color: var(--brand-primary);
}

/* Character counter */
.char-counter {
    font-size: 0.75rem;
    color: var(--brand-neutral-beige);
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: var(--color-warning);
}

.char-counter.danger {
    color: var(--color-danger);
}

/* Tag input */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--brand-light-neutral);
    border-radius: 8px;
    min-height: 48px;
    cursor: text;
}

.tag-input-container:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(22, 30, 86, 0.1);
}

.tag-input-container .tag {
    background: var(--brand-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.tag-input-container .tag .remove-tag {
    cursor: pointer;
    opacity: 0.7;
}

.tag-input-container .tag .remove-tag:hover {
    opacity: 1;
}

.tag-input-container input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 100px;
    padding: 0.25rem;
}

/* File upload */
.file-upload-area {
    border: 2px dashed var(--brand-light-neutral);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-area:hover {
    border-color: var(--brand-primary);
    background: rgba(22, 30, 86, 0.03);
}

.file-upload-area.dragover {
    border-color: var(--brand-accent);
    background: rgba(244, 228, 72, 0.1);
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--brand-neutral-beige);
    margin-bottom: 1rem;
}

/* Preview card */
.preview-card {
    background: #f8f9fa;
    border: 1px solid var(--brand-light-neutral);
    border-radius: 12px;
    padding: 1rem;
}

.preview-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--brand-light-neutral);
}

.preview-card-header i {
    color: var(--brand-accent);
}

/* Phone preview */
.phone-preview {
    max-width: 320px;
    margin: 0 auto;
    background: #ece5dd;
    border-radius: 12px;
    padding: 1rem;
}

.phone-preview-message {
    background: #dcf8c6;
    padding: 0.75rem 1rem;
    border-radius: 8px 8px 8px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.phone-preview-message.incoming {
    background: white;
    border-radius: 8px 8px 0 8px;
}

/* Delivery status indicators */
.delivery-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.delivery-status .checks {
    color: #53bdeb;
}

.delivery-status .checks.delivered {
    color: #53bdeb;
}

.delivery-status .checks.read {
    color: #53bdeb;
}

/* Poll options styling */
.poll-option {
    background: white;
    border: 1px solid var(--brand-light-neutral);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.poll-option:hover {
    border-color: var(--brand-primary);
}

.poll-option .drag-handle {
    color: var(--brand-neutral-beige);
}

.poll-option input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
}

/* Progress list */
.progress-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.progress-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--brand-light-neutral);
}

.progress-list-item:last-child {
    border-bottom: none;
}

.progress-list-item .progress {
    flex: 1;
}

.progress-list-item .label {
    min-width: 120px;
}

.progress-list-item .value {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--brand-light-neutral);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-primary);
    border: 2px solid white;
}

.timeline-item.success::before {
    background: var(--color-success);
}

.timeline-item.pending::before {
    background: var(--brand-neutral-beige);
}

/* Activity feed */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--brand-light-neutral);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.activity-content {
    flex: 1;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--brand-neutral-beige);
}

/* Confirm button */
[data-confirm] {
    position: relative;
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-dark-neutral);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Dropdown tweaks */
.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.dropdown-item:hover {
    background: rgba(22, 30, 86, 0.05);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Member avatar */
.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Status dot */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.active { background: var(--color-success); }
.status-dot.inactive { background: var(--color-danger); }
.status-dot.pending { background: var(--color-warning); }

/* Hover effect for clickable rows */
.table-clickable tbody tr {
    cursor: pointer;
}

.table-clickable tbody tr:hover {
    background: rgba(22, 30, 86, 0.05);
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Print styles */
@media print {
    .sidebar, .topnav, .btn, .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
