/* Social Media Tools — Page-Specific Styles */

/* ── Login Page ──────────────────────────────────────────────── */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--gray-900) 0%, #312e81 100%);
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 48px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.login-card h1 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.login-card p {
    color: var(--gray-500);
    margin-bottom: 32px;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.google-btn:hover {
    border-color: var(--google);
    box-shadow: 0 2px 8px rgba(66,133,244,.2);
    text-decoration: none;
}

.google-btn img { width: 20px; height: 20px; }

/* ── Platform Icons ──────────────────────────────────────────── */

.platform-icon { margin-right: 4px; }
.platform-icon-facebook { color: var(--facebook); }
.platform-icon-instagram { color: var(--instagram); }
.platform-icon-twitter { color: var(--twitter); }
.platform-icon-pinterest { color: var(--pinterest); }

/* ── Posts Page ──────────────────────────────────────────────── */

.post-item {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.post-content {
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
}

.post-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.external-link {
    color: inherit;
    margin-left: 4px;
}

/* ── Compose Page ───────────────────────────────────────────── */

.compose-form-col {
    flex: 2;
    min-width: 400px;
}

.compose-preview-col {
    flex: 1;
    min-width: 300px;
}

.platform-cb { margin-right: 4px; }
.platform-active { color: #fff; }

/* Platform setting tabs */
.platform-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 0;
}

.platform-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .15s, border-color .15s;
}

.platform-tab:hover {
    color: var(--gray-700);
}

.platform-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.platform-tab-content {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 6px 6px;
    min-height: 60px;
}

.platform-panel {
    padding: 16px;
}

.platform-panel .form-group {
    margin-bottom: 12px;
}

.platform-panel .form-group:last-child {
    margin-bottom: 0;
}

.media-wrapper {
    position: relative;
    display: inline-block;
}

.preview-image {
    max-width: 100%;
    border-radius: 6px;
    max-height: 200px;
    object-fit: cover;
}

.media-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

.media-thumb-placeholder {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: none;
    font-size: 11px;
    cursor: pointer;
    line-height: 20px;
}

/* ── Select Page (Meta OAuth) ───────────────────────────────── */

.page-option {
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
}

/* ── Connect Page (Invite Flow) ──────────────────────────────── */

.connect-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 48px 16px;
    background: linear-gradient(135deg, var(--gray-900) 0%, #312e81 100%);
}

.connect-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.connect-card h1 {
    font-size: 22px;
    margin-bottom: 4px;
    color: var(--gray-900);
}

/* ── Analytics Page ─────────────────────────────────────────── */

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--google-analytics);
}

.date-range-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── Historical Trends / SEO Indicators ────────────────────── */

.stat-change {
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    min-height: 18px;
}

.position-improved { color: #16a34a; }
.position-declined { color: #dc2626; }
.position-stable { color: var(--gray-400); }

.keyword-new-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    background: #dcfce7;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keyword-new-header { background: #f0fdf4; }
.keyword-lost-header { background: #fef2f2; }

.keyword-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.keyword-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.keyword-list li:last-child { border-bottom: none; }

.kw-query {
    font-size: 13px;
    word-break: break-word;
}

.kw-meta {
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
}

.min-w-250 { min-width: 250px; }
.flex-1 { flex: 1; }
