/* Minimalne nadpisania Bootstrap 5 — Panel Globalmedia */
body {
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-header {
    font-weight: 600;
}

#previewCard .card-body {
    min-height: 200px;
    background-color: #fff;
}

#previewContent {
    font-size: 0.95rem;
    line-height: 1.5;
}

.badge {
    font-size: 0.8rem;
}

.table td, .table th {
    vertical-align: middle;
}

/* ========== Podgląd smartfona — ramka telefonu ========== */
.phone-frame {
    width: 375px;
    max-width: 100%;
    height: 700px;
    margin: 0 auto;
    border: 3px solid #1a1a1a;
    border-radius: 36px;
    background: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.18), inset 0 0 0 1px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
}

/* Notch */
.phone-frame::before {
    content: '';
    display: block;
    width: 130px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    margin: 0 auto;
    flex-shrink: 0;
}

/* Scrollowalna zawartość wewnątrz ramki */
.phone-frame-body {
    flex: 1;
    overflow-y: auto;
    background: #f0f2f5;
}

/* ========== Symulacja posta FB ========== */
.fb-post {
    background: #fff;
    margin: 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #050505;
}

.fb-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 0;
}

.fb-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1877f2;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fb-post-meta {
    line-height: 1.3;
}

.fb-post-name {
    font-weight: 600;
    font-size: 14px;
    color: #050505;
}

.fb-post-time {
    font-size: 12px;
    color: #65676b;
}

.fb-post-content {
    padding: 8px 16px 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 14px;
}

.fb-post-media img,
.fb-post-media video {
    width: 100%;
    display: block;
}

.fb-post-ai-label {
    padding: 4px 16px 8px;
    font-size: 12px;
    color: #65676b;
    font-style: italic;
}

.fb-post-link-preview {
    margin: 0 16px 12px;
    border: 1px solid #dadde1;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f2f5;
}

.fb-post-link-preview-body {
    padding: 10px 12px;
}

.fb-post-link-domain {
    font-size: 12px;
    color: #65676b;
    text-transform: uppercase;
}

.fb-post-link-title {
    font-size: 14px;
    font-weight: 600;
    color: #050505;
    margin-top: 2px;
}

.fb-post-reactions {
    display: flex;
    justify-content: space-around;
    padding: 8px 16px 12px;
    border-top: 1px solid #e4e6eb;
    margin-top: 4px;
    color: #65676b;
    font-size: 14px;
    font-weight: 600;
}

.fb-post-reactions span {
    cursor: default;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
}

/* Ramka telefonu bez notcha (pod zakładkami) */
.phone-frame-no-notch {
    border-radius: 0 0 36px 36px;
    border-top: none;
}

.phone-frame-no-notch::before {
    display: none;
}

/* Zakładki podglądu — styl w modalu */
.preview-tabs {
    border-bottom: none;
}

.preview-tabs .nav-link {
    color: rgba(255,255,255,.7);
    border: none;
    border-radius: 0;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    background: rgba(255,255,255,.1);
}

.preview-tabs .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.15);
}

.preview-tabs .nav-link.active {
    color: #fff;
    background: #1a1a1a;
    border: none;
}

/* ========== Symulacja posta IG ========== */
.ig-post {
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #262626;
}

.ig-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.ig-post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ig-post-username {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
    flex: 1;
}

.ig-post-more {
    color: #262626;
    cursor: default;
}

.ig-post-media img,
.ig-post-media video {
    width: 100%;
    display: block;
}

.ig-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
}

.ig-post-actions-left {
    display: flex;
    gap: 16px;
    color: #262626;
}

.ig-post-actions-left svg,
.ig-post-actions-right svg {
    cursor: default;
}

.ig-post-actions-right {
    color: #262626;
}

.ig-post-ai-label {
    padding: 0 14px 4px;
    font-size: 12px;
    color: #8e8e8e;
    font-style: italic;
}

.ig-post-caption {
    padding: 0 14px 8px;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.ig-post-caption-user {
    font-weight: 600;
    color: #262626;
    margin-right: 6px;
}

.ig-post-time {
    padding: 0 14px 12px;
    font-size: 10px;
    color: #8e8e8e;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* ========== Symulacja posta LinkedIn ========== */
.li-post {
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #000000e6;
}

.li-post-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px 0;
}

.li-post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0a66c2;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.li-post-meta {
    line-height: 1.3;
    flex: 1;
}

.li-post-name {
    font-weight: 600;
    font-size: 14px;
    color: #000000e6;
}

.li-post-headline {
    font-size: 12px;
    color: #00000099;
    margin-top: 1px;
}

.li-post-time {
    font-size: 12px;
    color: #00000099;
    display: flex;
    align-items: center;
    gap: 4px;
}

.li-post-content {
    padding: 8px 16px 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 14px;
}

.li-post-media img,
.li-post-media video {
    width: 100%;
    display: block;
}

.li-post-ai-label {
    padding: 4px 16px 8px;
    font-size: 12px;
    color: #00000099;
    font-style: italic;
}

.li-post-reactions {
    display: flex;
    justify-content: space-around;
    padding: 8px 16px 12px;
    border-top: 1px solid #e0e0e0;
    margin-top: 4px;
    color: #00000099;
    font-size: 13px;
    font-weight: 600;
}

.li-post-reactions span {
    cursor: default;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
}

.li-post-reactions span svg {
    width: 20px;
    height: 20px;
}

/* Modal podglądu — ciemne tło */
#phonePreviewModal .modal-content {
    background: transparent !important;
}

#phonePreviewModal .modal-backdrop,
#phonePreviewModal {
    backdrop-filter: blur(4px);
}

/* ========== Responsywność podglądu ========== */
@media (max-width: 480px) {
    .phone-frame {
        width: 100%;
        height: 600px;
        border-radius: 24px;
    }
    .phone-frame::before {
        width: 100px;
        height: 22px;
        border-radius: 0 0 12px 12px;
    }
    .phone-frame-no-notch {
        border-radius: 0 0 24px 24px;
    }
}
