/* Reusable Component Styles */

.no-spinners::-webkit-inner-spin-button,
.no-spinners::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.no-spinners {
    -moz-appearance: textfield;
}

.btn-icon-only {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: transform 0.3s;
    color: var(--text-main);
}

.btn-icon-only:hover {
    transform: scale(1.1);
}

.btn-floating-add {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 400;
    flex-shrink: 0;
}

/* Modals */
.modal-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-section-title {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Auth Views */
.auth-logo {
    margin-bottom: 24px;
    color: var(--text-main);
}

.auth-title {
    margin-bottom: 16px;
}

.auth-desc {
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Notif Badge */
.badge-danger-circle {
    display: inline-flex;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* Source Tab Buttons */
.tab-source-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

/* Dropdowns */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    z-index: 1000;
    margin-top: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
}

/* Gantt Tabs */
.gantt-tabs-container {
    display: flex;
    background: var(--bg-surface);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.gantt-tab {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.gantt-tab:not(.active) {
    background: transparent;
    color: var(--text-secondary);
}

.gantt-tab.active {
    background: var(--primary);
    color: white;
}

/* Select */
select.select-sm {
    margin: 0;
    width: auto;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Markdown Content Styling */
.markdown-body ul {
    list-style-type: disc;
    padding-left: 24px;
    margin-bottom: 12px;
}

.markdown-body ol {
    list-style-type: decimal;
    padding-left: 24px;
    margin-bottom: 12px;
}

.markdown-body li {
    margin-bottom: 4px;
}

/* Collapsible Comments */
.comment-collapsible {
    cursor: pointer;
    transition: max-height 0.3s ease;
}
.comment-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comment-collapsible:hover {
    opacity: 0.8;
}

/* Custom Checklist Styling */
.checklist-row {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.checklist-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.custom-checkbox-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
    margin: 0;
}
.custom-checkbox-display {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.custom-checkbox-input:checked + .custom-checkbox-display {
    background: var(--primary);
    border-color: var(--primary);
}
.custom-checkbox-display svg {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.custom-checkbox-input:checked + .custom-checkbox-display svg {
    opacity: 1;
    transform: scale(1);
}

.checklist-text-wrapper {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}
.checklist-text-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
    opacity: 0.7;
}
.checklist-text-wrapper.checked {
    color: var(--text-muted);
}
.checklist-text-wrapper.checked::after {
    width: 100%;
}

/* Toastify Overrides to respect dark theme */
div.toastify {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    font-family: inherit;
}

/* Archive Toggle Button */
.archive-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}
.archive-toggle input[type="checkbox"] {
    display: none;
}
.archive-toggle .archive-icon {
    color: var(--text-muted, #9ca3af);
    transition: all 0.2s ease-in-out;
    padding: 6px;
    border-radius: 6px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.archive-toggle:hover .archive-icon {
    color: var(--text-main, #333);
    background-color: var(--black-10, rgba(0,0,0,0.05));
}
.archive-toggle input[type="checkbox"]:checked + .archive-icon {
    color: var(--primary-color, #3b82f6);
    background-color: var(--primary-color-10, rgba(59, 130, 246, 0.1));
}

/* Microsoft Planner and Status Badges */
.badge-planner,
.badge-ms-planner,
.ms-planner-badge {
    background-color: #0078d4;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 120, 212, 0.2);
}

[data-theme="dark"] .badge-planner,
[data-theme="dark"] .badge-ms-planner,
[data-theme="dark"] .ms-planner-badge {
    background-color: #0078d4;
    color: #ffffff;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .badge-success {
    background: rgba(34, 197, 94, 0.25);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}

.badge-secondary {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
    border: 1px solid rgba(156, 163, 175, 0.3);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .badge-secondary {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.35);
}

/* Tab Pills */
.tab-pill,
.tab-source-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--bg-surface, rgba(255, 255, 255, 0.05));
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-pill:hover,
.tab-source-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main, #1e293b);
}

.tab-pill.active,
.tab-source-btn.active {
    background: var(--primary, #a855f7);
    color: #ffffff;
    border-color: var(--primary, #a855f7);
}


