/* ==========================================================================
   GigaSmak.pl - Główny Arkusz Stylów Forum
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Modern Postbit Layout (Nowy Układ Postów)
   -------------------------------------------------------------------------- */

/* Główna karta pojedynczego posta */
.gs-postbit-card {
    display: flex;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* LEWA KOLUMNA: AUTOR */
.gs-postbit-author {
    width: 220px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}

/* Awatar autora */
.gs-author-avatar-box {
    margin-bottom: 12px;
}

.gs-author-avatar-box img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f97316;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

/* Informacje o autorze (.gs-postbit-author-info) */
.gs-postbit-author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    width: 100%;
}

.gs-author-name {
    font-size: 1.1em;
    font-weight: 800;
    line-height: 1.2;
}

.gs-author-name a {
    color: #000000 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.gs-author-name a:hover {
    color: #ea580c !important;
}

.gs-author-status {
    display: flex;
    justify-content: center;
    margin: 2px 0;
}

.gs-author-badge {
    margin-top: 2px;
}

.gs-author-badge img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Statystyki autora pod odznaką */
.gs-author-stats {
    font-size: 0.82em;
    color: #475569;
    width: 100%;
    border-top: 1px dashed #cbd5e1;
    padding-top: 10px;
    margin-top: 4px;
    line-height: 1.5;
}

/* PRAWA KOLUMNA: TREŚĆ POSTA */
.gs-postbit-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #ffffff;
}

/* Nagłówek posta (Data, link do posta) */
.gs-postbit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #64748b;
}

.gs-postbit-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.gs-postbit-postnum a {
    color: #94a3b8 !important;
    font-weight: 700;
    text-decoration: none;
}

.gs-postbit-postnum a:hover {
    color: #ea580c !important;
}

/* Treść wiadomości */
.gs-postbit-body {
    font-size: 0.95em;
    color: #000000;
    line-height: 1.7;
    flex-grow: 1;
    min-height: 100px;
}

/* Meta / IP w stopce posta */
.gs-postbit-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78em;
    color: #94a3b8;
    margin-top: 15px;
}

/* Przyciski akcji (Odpowiedz, Cytuj, Edit, itp.) */
.gs-postbit-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 15px;
}

.gs-postbit-btns-left,
.gs-postbit-btns-right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gs-postbit-controls a {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #000000 !important;
    border: 1px solid #cbd5e1;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.gs-postbit-controls a:hover {
    background: #f97316;
    color: #ffffff !important;
    border-color: #f97316;
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.3);
}


/* --------------------------------------------------------------------------
   2. Status Online/Offline w Postbit (Bez PNG)
   -------------------------------------------------------------------------- */
.gs-postbit-status {
    display: inline-block;
    margin-top: 6px;
}

.gs-postbit-status a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1;
    transition: all 0.2s ease;
}

/* Wariant ONLINE */
.gs-postbit-online a {
    background: #ecfdf5;
    color: #047857 !important;
    border: 1px solid #a7f3d0;
}

.gs-postbit-online a:hover {
    background: #d1fae5;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.gs-postbit-online .gs-postbit-dot {
    position: relative;
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
}

.gs-postbit-online .gs-postbit-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 11px;
    height: 11px;
    background-color: rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    animation: gsPulseDot 1.8s infinite ease-in-out;
}

@keyframes gsPulseDot {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(0.8); opacity: 0; }
}

/* Wariant OFFLINE */
.gs-postbit-offline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 700;
    background: #f8fafc;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
}

.gs-postbit-offline .gs-postbit-dot {
    width: 7px;
    height: 7px;
    background-color: #94a3b8;
    border-radius: 50%;
}


/* --------------------------------------------------------------------------
   3. Odznaka Ekipy w Profilu (#klocek)
   -------------------------------------------------------------------------- */
.gs-badge-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #ea580c;
    border-radius: 10px;
    padding: 10px 16px;
    margin: 8px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.gs-badge-box.memedivgroup4 {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #dc2626;
}

.gs-badge-box.memedivgroup3 {
    background: #fff7ed;
    border-color: #fed7aa;
    border-left-color: #ea580c;
}

.gs-badge-icon {
    font-size: 1.3em;
    line-height: 1;
}

.gs-badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gs-badge-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #64748b;
    display: block;
}

.gs-badge-text {
    margin: 0;
    font-size: 0.9em;
    color: #000000;
    font-weight: 500;
}

.gs-badge-text strong {
    color: #ea580c;
    font-weight: 800;
}

.gs-badge-box.memedivgroup4 .gs-badge-text strong {
    color: #dc2626;
}


/* --------------------------------------------------------------------------
   4. Profil Użytkownika (Struktura & Awatar)
   -------------------------------------------------------------------------- */
.gs-profile-wrapper {
    margin: 20px 0;
}

.gs-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.gs-profile-avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.gs-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f97316;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
    display: block;
}

.gs-profile-main-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.gs-profile-username {
    font-size: 1.8em;
    font-weight: 800;
    margin: 0;
    color: #000000;
}

.gs-profile-status {
    display: flex;
    justify-content: center;
}

.gs-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.gs-profile-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gs-user-options-btns {
    margin-top: 15px;
    text-align: center;
}


/* --------------------------------------------------------------------------
   5. Wskaźniki Statusu Badges (Online / Offline)
   -------------------------------------------------------------------------- */
.gs-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
    user-select: none;
}

.gs-status-online {
    background: #ecfdf5;
    color: #047857 !important;
    border: 1px solid #a7f3d0;
}

.gs-status-online .gs-status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
}

.gs-status-online .gs-status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 12px;
    height: 12px;
    background-color: rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    animation: gsPulse 1.8s infinite ease-in-out;
}

@keyframes gsPulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(0.8); opacity: 0; }
}

.gs-status-offline {
    background: #f8fafc;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
}

.gs-status-offline .gs-status-dot {
    width: 8px;
    height: 8px;
    background-color: #94a3b8;
    border-radius: 50%;
}


/* --------------------------------------------------------------------------
   6. Moduł "Kto jest Online", Tabela Statystyk i Legenda Rang
   -------------------------------------------------------------------------- */
.gs-online-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.gs-online-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.gs-online-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gs-online-title h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 800;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gs-online-content {
    font-size: 0.92em;
    color: #000000;
    line-height: 1.6;
    margin-bottom: 18px;
}

.gs-online-content a {
    font-weight: 700;
}

/* Tabela Statystyk Forum */
.gs-stats-table-wrapper {
    margin: 16px 0;
    overflow-x: auto;
}

.gs-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.gs-stats-table th {
    background: #f1f5f9;
    color: #000000;
    font-weight: 800;
    text-align: left;
    padding: 10px 14px;
    font-size: 0.85em;
    text-transform: uppercase;
    border-bottom: 1px solid #cbd5e1;
}

.gs-stats-table td {
    padding: 10px 14px;
    color: #000000;
    font-size: 0.9em;
    border-bottom: 1px solid #e2e8f0;
}

.gs-stats-table tr:last-child td {
    border-bottom: none;
}

.gs-stat-num {
    font-weight: 800;
    color: #ea580c;
    background: #fff7ed;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #fed7aa;
}

/* Legenda Rang */
.gs-legend-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
    margin-top: 10px;
}

.gs-legend-title {
    font-size: 0.85em;
    font-weight: 800;
    color: #000000;
    text-transform: uppercase;
}

.gs-legend-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.gs-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86em;
    text-decoration: none !important;
    transition: transform 0.2s ease;
}

.gs-legend-item:hover {
    transform: translateY(-1px);
}

.gs-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-admin { background-color: #dc2626; box-shadow: 0 0 6px rgba(220, 38, 38, 0.4); }
.dot-mod { background-color: #ea580c; box-shadow: 0 0 6px rgba(234, 88, 12, 0.4); }
.dot-masterchef { background-color: #eab308; box-shadow: 0 0 6px rgba(234, 179, 8, 0.4); }
.dot-enthusiast { background-color: #16a34a; box-shadow: 0 0 6px rgba(22, 163, 74, 0.4); }
.dot-baker { background-color: #db2777; box-shadow: 0 0 6px rgba(219, 39, 119, 0.4); }
.dot-partner { background-color: #2563eb; box-shadow: 0 0 6px rgba(37, 99, 235, 0.4); }
.dot-beginner { background-color: #64748b; }


/* --------------------------------------------------------------------------
   7. Responsywność (Mobilne urządzenia)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .gs-postbit-card {
        flex-direction: column;
    }

    .gs-postbit-author {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .gs-postbit-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .gs-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .gs-profile-main-info {
        align-items: center;
    }

    .gs-legend-list {
        gap: 10px 14px;
    }
}