/* SocialAI Platform Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #059669;
    --accent-color: #ea580c;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
}

/* Login Page */
.login-bg {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.sidebar {
    min-height: calc(100vh - 56px);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: #6c757d;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 1.2rem;
}

/* Dashboard Cards */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-info {
    border-left: 4px solid #06b6d4 !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

/* Calendar Styles */
.calendar-table {
    width: 100%;
    table-layout: fixed;
}

.calendar-cell {
    height: 120px;
    vertical-align: top;
    padding: 8px;
    border: 1px solid #dee2e6;
    position: relative;
}

.calendar-cell:hover {
    background-color: #f8f9fa;
}

.calendar-cell.today {
    background-color: #e3f2fd;
    border-color: var(--primary-color);
}

.calendar-cell.other-month {
    color: #adb5bd;
    background-color: #f8f9fa;
}

.day-number {
    font-weight: bold;
    margin-bottom: 4px;
}

.posts-container {
    max-height: 80px;
    overflow-y: auto;
}

.calendar-post {
    font-size: 0.75rem;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-post:hover {
    opacity: 0.8;
}

/* Content Creator */
.social-post-preview {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background-color: white;
}

.post-header {
    display: flex;
    align-items: center;
}

.post-content {
    line-height: 1.5;
}

.template-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Analytics Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Account Management */
.account-card {
    border-radius: 10px;
    transition: transform 0.2s ease;
}

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

.platform-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.platform-facebook {
    background-color: #1877f2;
}

.platform-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* Settings */
.settings-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.api-key-input {
    font-family: 'Courier New', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .calendar-cell {
        height: 80px;
    }
    
    .posts-container {
        max-height: 40px;
    }
}

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

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

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status Badges */
.badge-draft { background-color: #6c757d; }
.badge-scheduled { background-color: var(--warning-color); }
.badge-published { background-color: var(--success-color); }
.badge-failed { background-color: var(--danger-color); }

/* Custom Buttons */
.btn-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: white;
}

/* Drag and Drop */
.draggable {
    cursor: move;
}

.drag-over {
    background-color: #e3f2fd !important;
    border: 2px dashed var(--primary-color) !important;
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

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