/* Social Media Manager - Custom Styles */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --border-radius: 0.5rem;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f6fa;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer .footer-link {
    color: #adb5bd !important;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

footer .footer-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

footer .social-links a {
    color: #adb5bd !important;
    transition: transform 0.3s ease, color 0.3s ease;
}

footer .social-links a:hover {
    transform: translateY(-2px);
    color: #ffffff !important;
}

footer h5,
footer h6 {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer .border-secondary {
    border-color: #6c757d !important;
}

/* Responsive footer */
@media (max-width: 768px) {
    footer .col-lg-3,
    footer .col-md-6 {
        margin-bottom: 2rem;
    }
    
    footer .social-links {
        text-align: center;
        margin-top: 1rem;
    }
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Dashboard Specific Styles */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: transform 0.2s ease;
}

.stats-card:hover {
    transform: scale(1.02);
}

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

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* Social Media Platform Colors */
.social-twitter {
    color: #1da1f2;
}

.social-facebook {
    color: #4267b2;
}

.social-instagram {
    color: #e4405f;
}

.social-linkedin {
    color: #0077b5;
}

.bg-twitter {
    background-color: #1da1f2 !important;
}

.bg-facebook {
    background-color: #4267b2 !important;
}

.bg-instagram {
    background-color: #e4405f !important;
}

.bg-linkedin {
    background-color: #0077b5 !important;
}

/* Post Content */
.post-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-preview {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Media Upload */
.media-upload-area {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.media-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
}

.media-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.1);
}

.media-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Analytics Charts */
.chart-container {
    position: relative;
    height: 400px;
    margin: 1rem 0;
}

.metric-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Tables */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: var(--border-radius);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Character Counter */
.character-counter {
    font-size: 0.875rem;
    font-weight: 500;
}

.character-counter.warning {
    color: var(--warning-color);
}

.character-counter.danger {
    color: var(--danger-color);
}

/* Scheduled Posts */
.scheduled-post-item {
    border-left: 4px solid var(--primary-color);
    background: white;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.scheduled-post-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(2px);
}

.scheduled-time {
    background: var(--primary-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Account Connection */
.platform-card {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.platform-card:hover {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.platform-card.connected {
    border-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.05);
}

.platform-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    color: #adb5bd !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: white !important;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #2c3e50;
        --dark-bg: #34495e;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer,
    .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Utility Classes */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.shadow-primary {
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3) !important;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid;
    }
    
    .card {
        border: 1px solid #000;
    }
}