/*
Theme Name: Icatuenses
Theme URI: 
Author: Antigravity
Author URI: 
Description: Rede Social Icatuenses — App Experience
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: icatuenses
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   DESIGN SYSTEM — APP ICATUENSES
   ======================================== */

:root {
    /* Nova Paleta Vibrante */
    --app-green: #10b981;
    --app-green-light: #d1fae5;
    --app-red: #ef4444;
    --app-red-light: #fee2e2;
    --app-blue: #009cff;
    --app-blue-deep: #0077d6;
    --app-blue-light: #e0f2fe;
    
    /* Cores Estruturais de Alto Contraste */
    --app-white: #ffffff;
    --app-bg-main: #e8eef2; /* Fundo mais escuro e azulado para contraste */
    
    /* Tons de Cinza (Texto) */
    --app-gray-50: #f8fafc;
    --app-gray-100: #f1f5f9;
    --app-gray-200: #e2e8f0;
    --app-gray-300: #cbd5e1;
    --app-gray-400: #94a3b8;
    --app-gray-500: #64748b;
    --app-gray-700: #334155;
    --app-dark: #0f172a; /* Texto mais denso */
    --app-gold: #f59e0b;

    /* Arredondamento Aumentado (Soft UI) */
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --radius-full: 9999px;

    /* Sombras Flutuantes Modernas */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.03);
    --shadow-md: 0 8px 16px -4px rgba(0, 156, 255, 0.08), 0 4px 8px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 16px 32px -8px rgba(0, 156, 255, 0.12), 0 8px 16px -4px rgba(0,0,0,0.06);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    --topbar-h: 60px;
    --bottombar-h: 70px;
}

/* ========================================
   RESET & BASE
   ======================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--app-bg-main); /* Novo fundo contrastante */
    color: var(--app-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--app-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--app-blue-deep); }

img { max-width: 100%; height: auto; }

input, select, textarea, button { font-family: inherit; }

/* ========================================
   APP SHELL — PHONE-LIKE CONTAINER
   ======================================== */

#page {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--app-bg-main);
    position: relative;
    box-shadow: 0 0 80px rgba(0,0,0,0.15);
}

@media (min-width: 481px) {
    body { background: #d0dbe3; }
    #page { border-left: 1px solid var(--app-gray-300); border-right: 1px solid var(--app-gray-300); }
}

/* ========================================
   TOP BAR
   ======================================== */

.app-topbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--topbar-h);
    background: var(--app-white);
    border-bottom: 1px solid var(--app-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

.app-topbar .app-logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--app-blue) 0%, var(--app-green) 50%, var(--app-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-topbar .app-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.app-topbar .app-actions a,
.app-topbar .app-actions button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--app-gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-gray-500);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.app-topbar .app-actions a:hover,
.app-topbar .app-actions button:hover {
    background: var(--app-blue-light);
    color: var(--app-blue-deep);
}

/* ========================================
   BOTTOM NAVIGATION BAR
   ======================================== */

.app-bottomnav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--bottombar-h);
    background: var(--app-white);
    border-top: 1px solid var(--app-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.app-bottomnav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--app-gray-400);
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 6px 12px;
    position: relative;
}

.app-bottomnav .nav-item i {
    font-size: 1.3rem;
    transition: var(--transition);
}

.app-bottomnav .nav-item.active {
    color: var(--app-blue-deep);
}

.app-bottomnav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--app-blue-deep);
    border-radius: 0 0 4px 4px;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.app-content {
    padding-top: calc(var(--topbar-h) + 8px);
    padding-bottom: calc(var(--bottombar-h) + 8px);
    padding-left: 12px;
    padding-right: 12px;
    min-height: 100vh;
}

/* Tab Sections */
.app-tab-section { display: none; }
.app-tab-section.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ========================================
   CARDS (Postagens e Blocos)
   ======================================== */

.app-card {
    background: var(--app-white);
    border: none; /* Remove a borda para visual mais limpo */
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.app-card.request-card {
    border-left: 4px solid var(--app-red);
}

/* ========================================
   COMPOSER (POST CREATION)
   ======================================== */

.app-composer {
    background: var(--app-white);
    border: none;
    border-radius: var(--radius-xl);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.app-composer textarea {
    width: 100%;
    min-height: 60px;
    background: transparent;
    border: none;
    color: var(--app-dark);
    resize: none;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    line-height: 1.5;
}

.app-composer textarea::placeholder { color: var(--app-gray-400); font-weight: 400; }

.composer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--app-gray-100);
    padding-top: 10px;
    margin-top: 8px;
}

.composer-bar .tools { display: flex; gap: 12px; }
.composer-bar .tools button {
    background: none;
    border: none;
    color: var(--app-gray-400);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.composer-tools button:hover {
    color: var(--app-blue);
    background: var(--app-blue-light);
}

/* Tipos de Postagem dinâmicos */
.btn-post-type {
    background: white;
    border: 1px solid var(--app-gray-200);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    color: var(--app-gray-400);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.btn-post-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    color: var(--app-blue);
    border-color: var(--app-blue-light);
}
.btn-post-type.active {
    background: var(--app-blue);
    color: white !important;
    border-color: var(--app-blue);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Feed */
.composer-bar .tools button.tool-request { color: var(--app-red); }
.composer-bar .tools button.tool-request:hover { background: var(--app-red-light); }

.char-counter { font-size: 0.75rem; color: var(--app-gray-400); }
.char-counter.warning { color: var(--app-red); font-weight: 600; }

/* ========================================
   POST CARD
   ======================================== */

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.post-header .user-info { display: flex; gap: 10px; align-items: center; }

.post-header .user-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--app-gray-100);
}

.post-header .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--app-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-header .user-name .whatsapp-icon {
    color: var(--app-green);
    font-size: 1rem;
}

.post-header .authority-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--app-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 1px;
}

.post-header .post-time {
    font-size: 0.75rem;
    color: var(--app-gray-400);
    margin-top: 1px;
}

.request-badge {
    background: var(--app-red-light);
    color: var(--app-red);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.post-body {
    font-size: 0.95rem;
    color: var(--app-gray-700);
    margin-bottom: 12px;
    word-break: break-word;
    line-height: 1.6;
}

.post-body img {
    border-radius: var(--radius-md);
    margin-top: 10px;
    width: 100%;
}

/* Post Actions Bar */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--app-gray-100);
    padding-top: 8px;
    position: relative;
    z-index: 10;
    isolation: isolate;
}

.post-actions .action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-actions button {
    flex: 1;
    background: none;
    border: none;
    color: var(--app-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition);
    pointer-events: auto;
}

.post-actions button:hover { background: var(--app-gray-50); }
.post-actions .btn-like:hover { color: var(--app-blue-deep); }
.post-actions .btn-dislike:hover { color: var(--app-red); }
.post-actions .btn-comment:hover { color: var(--app-blue-deep); }
.post-actions .btn-favorite:hover { color: var(--app-gold); }

.post-actions .btn-like.active { color: var(--app-blue-deep); }
.post-actions .btn-dislike.active { color: var(--app-red); }
.post-actions .btn-favorite.active i { color: var(--app-gold); }

/* ========================================
   COMMENTS SECTION
   ======================================== */

.comments-section {
    display: none;
    margin-top: 12px;
    border-top: 1px solid var(--app-gray-100);
    padding-top: 12px;
}

.comment-bubble {
    background: var(--app-gray-50);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 8px;
}

.comment-bubble .comment-author {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--app-blue-deep);
}

.comment-bubble .comment-text {
    font-size: 0.85rem;
    color: var(--app-gray-700);
    margin-top: 2px;
}

.comment-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.comment-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--app-gray-200);
    background: var(--app-gray-50);
    color: var(--app-dark);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.comment-form input:focus { border-color: var(--app-blue); box-shadow: 0 0 0 3px var(--app-blue-light); }

.comment-form button {
    padding: 10px 16px;
    border-radius: var(--radius-full);
    background: var(--app-blue-deep);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.comment-form button:hover { background: var(--app-blue); }

/* ========================================
   ONLINE USERS TAB
   ======================================== */

.online-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.online-header .online-dot {
    width: 10px; height: 10px;
    background: var(--app-green);
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.online-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--app-white);
    border: 1px solid var(--app-gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: var(--transition);
}

.online-user-item:hover { box-shadow: var(--shadow-sm); }

.online-user-item img {
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--app-green-light);
}

.online-user-item span { font-size: 0.9rem; font-weight: 500; color: var(--app-dark); }

/* ========================================
   MINI POST WRAPPER (Favoritos)
   ======================================== */

.mini-post-wrapper .app-card {
    padding: 12px;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
}

.mini-post-wrapper .post-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-post-wrapper .post-header .user-avatar {
    width: 32px;
    height: 32px;
}

.mini-post-wrapper .post-header .user-name {
    font-size: 0.8rem;
}

.mini-post-wrapper .post-body {
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.mini-post-wrapper .post-actions {
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 4px;
}

.mini-post-wrapper .post-actions button {
    font-size: 0.7rem;
    padding: 4px;
}

.mini-post-wrapper .comments-section,
.mini-post-wrapper .btn-favorite {
    display: none !important; /* Esconde seção de comentários e o botão de favoritar nativo no card miniatura */
}

/* ========================================
   FILTER TAB
   ======================================== */

.filter-group {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--app-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--app-gray-200);
    background: var(--app-white);
    color: var(--app-dark);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--app-blue);
    box-shadow: 0 0 0 3px var(--app-blue-light);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
    background: var(--app-blue-deep);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary:hover {
    background: var(--app-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 156, 255, 0.35); /* Vivid Sky Blue shadow */
}

.btn-outline {
    background: transparent;
    color: var(--app-blue-deep);
    border: 1.5px solid var(--app-blue-deep);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--app-blue-light);
}

/* ========================================
   FORM CONTROLS (Login / Register)
   ======================================== */

.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--app-gray-200);
    background: var(--app-white);
    color: var(--app-dark);
    font-size: 0.9rem;
    margin-top: 5px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--app-blue);
    box-shadow: 0 0 0 3px var(--app-blue-light);
}

.form-control::placeholder { color: var(--app-gray-400); }

/* WP Login Form overrides */
.login-username label,
.login-password label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--app-gray-500);
}

.login-username input,
.login-password input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--app-gray-200);
    background: var(--app-white);
    color: var(--app-dark);
    margin-top: 5px;
    outline: none;
    transition: var(--transition);
}

.login-username input:focus,
.login-password input:focus {
    border-color: var(--app-blue);
    box-shadow: 0 0 0 3px var(--app-blue-light);
}

.login-submit input {
    width: 100%;
    background: var(--app-blue-deep);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
    font-size: 0.9rem;
}

.login-submit input:hover {
    background: var(--app-blue);
    transform: translateY(-1px);
}

.login-remember {
    text-align: left;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--app-gray-500);
}

/* ========================================
   LANDING PAGE
   ======================================== */

.landing-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--topbar-h));
    padding: 24px 16px;
    text-align: center;
}

.landing-wrapper h1 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--app-dark);
}

.landing-wrapper h1 span {
    background: linear-gradient(135deg, var(--app-blue) 0%, var(--app-green) 50%, var(--app-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-wrapper p {
    color: var(--app-gray-500);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.landing-form {
    width: 100%;
    max-width: 400px;
    text-align: left;
}

/* Google Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--app-white);
    color: var(--app-dark);
    padding: 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1.5px solid var(--app-gray-200);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.btn-google:hover {
    border-color: var(--app-gray-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--app-gray-400);
    margin: 16px 0;
}

.divider span:first-child,
.divider span:last-child {
    flex: 1;
    border-bottom: 1px solid var(--app-gray-200);
}

.divider span:nth-child(2) {
    margin: 0 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--app-gray-400);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    color: var(--app-gray-300);
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--app-gray-300); border-radius: 4px; }

/* ========================================
   RESPONSIVE — ensure app look everywhere
   ======================================== */

@media (max-width: 480px) {
    .app-topbar, .app-bottomnav {
        max-width: 100%;
    }
    #page {
        max-width: 100%;
        box-shadow: none;
        border: none;
    }
}

/* ========================================
   @MENTIONS & TRENDING TOPICS
   ======================================== */

.mention-tag {
    color: var(--app-blue-deep);
    font-weight: 600;
    background: var(--app-blue-light);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    padding: 4px 0;
}

.trending-item .trending-medal {
    font-size: 1.1rem;
    min-width: 22px;
    text-align: center;
}

.trending-item .trending-tag {
    font-weight: 600;
    color: var(--app-blue-deep);
}

.trending-item .trending-count {
    color: var(--app-gray-400);
    font-size: 0.78rem;
    margin-left: auto;
}
