/* 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: #eee;
}

.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 Styling */
.card {
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-medium);
    margin-bottom: 1.5rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
    border-color: var(--border-light);
}

.card-header {
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
    background: var(--surface-dark);
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-primary);
}

.card-body {
    background: var(--bg-card);
    color: var(--text-primary);
}

.card-title {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
}

/* 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);
}

/* 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;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-blue-hover) 0%, #084298 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 {
    border-color: #0d6efd;
    color: #0d6efd;
    border-radius: 10px;
}

.btn-outline-primary:hover {
    background: #0d6efd;
    color: #ffffff;
}

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

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

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

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

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

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

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

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

.btn-danger {
    background: #ef4444;
    border: none;
    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(13, 110, 253, 0.15);
    color: #3d8bfd;
    border: 1px solid rgba(13, 110, 253, 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);
}

/* Badges */
.badge {
    border-radius: 6px;
    padding: 0.375rem 0.625rem;
    font-weight: 600;
}

.badge.bg-primary {
    background: rgba(13, 110, 253, 0.2) !important;
    color: #3d8bfd;
}

.badge.bg-success {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80;
}

.badge.bg-warning {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24;
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171;
}

.badge.bg-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.7);
}

/* 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: #0d6efd !important;
}

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

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

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

/* Links */
a {
    color: #0d6efd;
    text-decoration: none;
}

a:hover {
    color: #3d8bfd;
}

/* Selection */
::selection {
    background: rgba(13, 110, 253, 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;
    }
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Button enhancements */
.btn {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: #0d6efd;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #084298 100%);
    border-color: #0a58ca;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #157347 0%, #0f5132 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #bb2d3b 0%, #a02834 100%);
    color: white;
}

/* Custom button colors */
.btn-outline-primary {
    background-color: transparent;
    color: #0d6efd;
    border: 2px solid #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.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(13, 110, 253, 0.25);
}

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

/* Pagination styling */
.pagination .page-link {
    color: #0d6efd;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 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: #0d6efd;
    background-color: rgba(13, 110, 253, 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(13, 110, 253, 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;
}
