/* Main styling for social platform - Theme Aware */

/* Override Bootstrap container for main content */
.main-content .container {
    max-width: 1200px;
}

/* Avatar and Image Styling */
.avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background-color: var(--surface-light);
}

.avatar-placeholder {
    background-color: var(--surface-light);
    border: 1px solid var(--border-medium);
    color: var(--text-muted);
}

.img-profile {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
}

.img-profile-sm {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

/* Card modifier — no lift on hover for static/informational cards */
.card.card-static:hover {
    transform: none;
    box-shadow: var(--shadow-card);
}

/* Activity Cards */
.activity-card {
    transition: transform 0.2s ease;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
}

.activity-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

.activity-card-media {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    background: var(--surface-light);
}

.activity-card-media img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.activity-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
    background: var(--surface-light);
}

/* Rating Stars */
.stars {
    font-size: 1.2rem;
    color: var(--accent-yellow);
}

.rating-input label.active,
.rating-input label:hover {
    color: var(--accent-yellow);
    background-color: rgba(251, 191, 36, 0.15);
    border-color: var(--accent-yellow);
}

/* Message List Styling */
.list-group {
    background: transparent;
}

.list-group-item {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
}

.list-group-item-action:hover {
    background-color: var(--surface-light);
    color: var(--text-primary);
}

.list-group-item.list-group-item-warning {
    border-left: 4px solid var(--accent-yellow);
    background: rgba(251, 191, 36, 0.1);
}

/* Dashboard Cards */
.dashboard-stat-card {
    border-radius: 16px;
    transition: box-shadow 0.3s ease;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
}

.dashboard-stat-card:hover {
    box-shadow: var(--shadow-card-hover);
}

/* Navigation */
.navbar {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-dark);
    box-shadow: var(--shadow-sm);
}

.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
}

.dropdown-item:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border-dark);
}

/* Profile Page */
.profile-header {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-medium);
}

.rating-box {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-medium);
}

/* =====================================================
   Avatar Size Classes
   ===================================================== */
.avatar-sm {
    width: var(--avatar-sm);
    height: var(--avatar-sm);
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-md {
    width: var(--avatar-md);
    height: var(--avatar-md);
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-lg {
    width: var(--avatar-lg);
    height: var(--avatar-lg);
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-placeholder-gradient {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* =====================================================
   Action Buttons — compact icon/text buttons for
   profile banners and action rows
   ===================================================== */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    background: none;
    line-height: 1.4;
}

.action-btn.action-primary {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}
.action-btn.action-primary:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
    color: #fff;
}

.action-btn.action-secondary {
    background: var(--surface-light);
    color: var(--text-secondary);
    border-color: var(--border-medium);
}
.action-btn.action-secondary:hover {
    background: var(--surface-dark);
    color: var(--text-primary);
}

.action-btn.action-success {
    background: var(--accent-green);
    color: #fff;
    border-color: var(--accent-green);
}
.action-btn.action-success:hover {
    filter: brightness(0.9);
    color: #fff;
}

.action-btn.action-warning {
    background: var(--accent-yellow);
    color: #1a1a1a;
    border-color: var(--accent-yellow);
}
.action-btn.action-warning:hover {
    filter: brightness(0.92);
    color: #1a1a1a;
}

.action-btn.action-info {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
    border-color: rgba(13, 202, 240, 0.3);
}
.action-btn.action-info:hover {
    background: rgba(13, 202, 240, 0.2);
    color: #0dcaf0;
}

.action-btn.action-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--accent-red);
    border-color: rgba(220, 53, 69, 0.3);
}
.action-btn.action-danger:hover {
    background: rgba(220, 53, 69, 0.2);
    color: var(--accent-red);
}

/* =====================================================
   Utility
   ===================================================== */
.scrollable-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Portfolio thumbnail containers */
.portfolio-thumb {
    height: 120px;
    overflow: hidden;
}

.portfolio-thumb-lg {
    height: 160px;
    overflow: hidden;
}

/* Activity Details */
.activity-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Messages */
.message-content {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-medium);
}

/* Footer */
footer {
    margin-top: 3rem;
    background-color: var(--footer-bg);
    color: var(--text-muted);
    border-top: 1px solid var(--border-dark);
    padding: 2rem 0;
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.form-control::placeholder {
    color: var(--text-placeholder);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-check-input {
    background-color: var(--surface-light);
    border-color: var(--border-light);
}

.form-check-input:checked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.form-check-label {
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-hover) 100%);
    border: none;
    color: var(--accent-contrast, #0E2233);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-blue-hover) 0%, var(--craft-indigo) 100%);
    box-shadow: 0 4px 16px var(--accent-blue-glow);
}

.btn-secondary {
    background: var(--surface-light);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--surface-highlight);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.btn-outline-primary {
    background: rgba(83, 232, 103, 0.08);
    border: 1.5px solid rgba(30, 143, 78, 0.28);
    color: var(--accent-blue);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--accent-blue);
    color: #ffffff;
}

.btn-outline-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1.5px solid rgba(239, 68, 68, 0.28);
    color: #dc2626;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: #ffffff;
}

.btn-outline-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1.5px solid rgba(34, 197, 94, 0.28);
    color: #16a34a;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-outline-success:hover {
    background: #22c55e;
    color: #ffffff;
}

.btn-outline-secondary {
    background: var(--surface-light);
    border: 1.5px solid var(--border-medium);
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-outline-secondary:hover {
    background: var(--surface-light);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-success {
    background: #22c55e;
    border: none;
    color: #ffffff;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
    border: none;
    color: #ffffff;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-danger:hover {
    background: #dc2626;
    color: #ffffff;
}

.btn-warning {
    background: #fbbf24;
    border: none;
    color: #1a1a1a;
    border-radius: 10px;
}

.btn-warning:hover {
    background: #f59e0b;
    color: #1a1a1a;
}

.btn-info {
    background: #06b6d4;
    border: none;
    border-radius: 10px;
}

.btn-info:hover {
    background: #0891b2;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
}

.alert-primary {
    background: rgba(30, 143, 78, 0.15);
    color: #3d8bfd;
    border: 1px solid rgba(30, 143, 78, 0.25);
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.alert-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-info {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.25);
}


/* Tables */
.table {
    color: var(--text-primary);
}

.table thead th {
    background: var(--surface-dark);
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    border-bottom: 1px solid var(--border-dark);
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: var(--surface-light);
}

/* Modal */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid var(--border-dark);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border-dark);
    padding: 1rem 1.5rem;
}

.btn-close {
    filter: var(--btn-close-filter, none);
}

body.dark-mode .btn-close {
    filter: invert(1);
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
}

.page-link:hover {
    background: var(--surface-light);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

.page-item.disabled .page-link {
    background: var(--bg-card);
    border-color: var(--border-dark);
    color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--accent-blue);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* Text utilities */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--accent-blue) !important;
}

.text-success {
    color: #22c55e !important;
}

.text-warning {
    color: #fbbf24 !important;
}

.text-danger {
    color: #ef4444 !important;
}

/* Links */
a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    color: #3d8bfd;
}

/* Selection */
::selection {
    background: rgba(30, 143, 78, 0.3);
    color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-highlight);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .profile-header {
        padding: 1rem;
    }
}


.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
    border-radius: 12px;
}

/* Form styling */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(30, 143, 78, 0.25);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Pagination styling */
.pagination .page-link {
    color: var(--accent-blue);
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Activity template selection styles */
.activity-template-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.activity-template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.activity-template-card.selected {
    border-color: var(--accent-blue);
    background-color: rgba(83, 232, 103, 0.05);
}

/* Unread message indicator */
.unread-indicator {
    position: relative;
}

.unread-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
}

/* Helper classes */
.bg-light-primary {
    background-color: rgba(83, 232, 103, 0.1);
}

.bg-light-success {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-light-warning {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-light-danger {
    background-color: rgba(220, 53, 69, 0.1);
}

.bg-light-info {
    background-color: rgba(13, 202, 240, 0.1);
}

/* Activity status badges */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.status-published {
    background-color: #198754;
    color: white;
}

.status-draft {
    background-color: #6c757d;
    color: white;
}

.status-cancelled {
    background-color: #dc3545;
    color: white;
}

.status-completed {
    background-color: #0dcaf0;
    color: white;
}

/* =====================================================
   Create Button — FAB Treatment
   ===================================================== */

.nav-item-create {
    margin: var(--space-xs) var(--space-md);
    width: calc(100% - 2 * var(--space-md));
    padding: 10px var(--space-md);
    background: var(--gradient-primary);
    color: white !important;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition:
        transform 200ms var(--ease-out-quart),
        box-shadow 200ms var(--ease-out-quart),
        background 200ms ease;
    box-shadow: 0 4px 14px rgba(30, 143, 78, 0.35);
    justify-content: center;
    gap: var(--space-sm);
}

.nav-item-create i {
    color: white !important;
    font-size: 0.9rem;
    transition: transform 220ms var(--ease-out-expo) !important;
}

.nav-item-create:hover {
    color: white !important;
    background: linear-gradient(135deg, var(--accent-blue-hover) 0%, #5a32a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 143, 78, 0.45);
}

.nav-item-create:hover i {
    transform: rotate(90deg) scale(1.1) !important;
}

.nav-item-create:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 12px rgba(30, 143, 78, 0.3) !important;
}

.nav-item-create.active {
    color: white !important;
    /* Keep the solid gradient when the Create page is active. Without this the
       more-specific `.nav-item.active` rule wins and paints a faint indigo-tint
       gradient, leaving white text on a near-transparent fill (invisible on a
       light background). */
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 14px rgba(30, 143, 78, 0.35);
}

.nav-item-create.active::before {
    display: none;
}

/* Minimized sidebar: round icon only */
.app-sidebar.minimized .nav-item-create {
    width: 40px;
    height: 40px;
    padding: 0;
    margin: var(--space-xs) auto;
    border-radius: var(--radius-full);
    justify-content: center;
}

.app-sidebar.minimized .nav-item-create i {
    font-size: 1rem;
    margin: 0;
}

/* =====================================================
   Sidebar Nav Entrance Animation
   ===================================================== */

@keyframes nav-slide-in {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.sidebar-nav .nav-item {
    animation: nav-slide-in 300ms var(--ease-out-expo) both;
}

.sidebar-nav .nav-item:nth-child(1)  { animation-delay: 20ms; }
.sidebar-nav .nav-item:nth-child(2)  { animation-delay: 50ms; }
.sidebar-nav .nav-item:nth-child(3)  { animation-delay: 80ms; }
.sidebar-nav .nav-item:nth-child(4)  { animation-delay: 110ms; }
.sidebar-nav .nav-item:nth-child(5)  { animation-delay: 140ms; }
.sidebar-nav .nav-item:nth-child(6)  { animation-delay: 170ms; }
.sidebar-nav .nav-item:nth-child(7)  { animation-delay: 200ms; }
.sidebar-nav .nav-item:nth-child(8)  { animation-delay: 230ms; }
.sidebar-nav .nav-item:nth-child(9)  { animation-delay: 260ms; }
.sidebar-nav .nav-item:nth-child(n+10) { animation-delay: 290ms; }

.sidebar-nav .nav-separator {
    animation: nav-slide-in 300ms var(--ease-out-expo) both;
    animation-delay: 155ms;
}

/* =====================================================
   Sidebar User Section Polish
   ===================================================== */

.sidebar-avatar {
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 2px var(--accent-blue);
    transition: box-shadow 200ms var(--ease-out-quart);
}

.sidebar-avatar:hover {
    box-shadow: 0 0 0 3px var(--accent-blue), 0 4px 16px rgba(30, 143, 78, 0.3);
}

/* Online status dot on user section */
.sidebar-user-section .user-profile-status::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    margin-right: 5px;
    vertical-align: middle;
    animation: pulse-ring 2s cubic-bezier(0,0,0.2,1) infinite;
}

/* Control buttons: enhanced hover */
.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 143, 78, 0.2);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-nav .nav-item,
    .sidebar-nav .nav-separator {
        animation: none;
    }
    .sidebar-user-section .user-profile-status::before {
        animation: none;
    }
}
