/* ═══════════════════════════════════════════════════════════════
   SMM Planer — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────────── */
:root {
    --sidebar-width: 250px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f6fa;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar .nav-link {
    padding: 0.5rem 1rem;
    margin: 1px 0;
    font-size: 0.9rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    font-weight: 500;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    border-radius: 0.5rem;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ── Tables ────────────────────────────────────────────────────── */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
}

/* ── Media Library ─────────────────────────────────────────────── */
.media-card {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

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

.media-card.selected {
    outline: 3px solid #0d6efd;
    outline-offset: -3px;
}

.object-fit-cover {
    object-fit: cover;
}

/* ── Drag & Drop Zone ──────────────────────────────────────────── */
.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
    border-color: #dee2e6 !important;
}

.border-dashed.border-primary {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.05);
}

/* ── Post Editor ───────────────────────────────────────────────── */
.tox-tinymce {
    border-radius: 0.375rem !important;
}

/* ── Preview ───────────────────────────────────────────────────── */
.preview-telegram,
.preview-vk,
.preview-pinterest {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#previewContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

#previewContainer > div {
    flex: 1;
    min-width: 250px;
}

/* ── Badges ────────────────────────────────────────────────────── */
.badge.bg-orange {
    background-color: #fd7e14 !important;
}

/* ── Mobile Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* ── Utility ───────────────────────────────────────────────────── */
.cursor-pointer {
    cursor: pointer;
}

.min-vh-50 {
    min-height: 50vh;
}

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

/* ── Spinner ───────────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ── Transitions ───────────────────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
