/*
Theme Name: AI with Ankitify
Theme URI: https://ankitify.com
Author: Ankit Aggarwal
Author URI: https://ankitify.com
Description: High-converting Post-Sales & CSOps Advisory theme for B2B SaaS. Features clean editorial bento design, interactive n8n workflow canvas, scroll-driven character scrub mechanics, retention ROI benchmarks, and zero page-builder bloat.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Proprietary
Text Domain: ai-with-ankitify
Tags: custom-menu, featured-images, translation-ready, block-styles, wide-blocks
*/

/* Core theme variables and reset fallbacks */
:root {
  --canvas: #F6F6FA;
  --card-bg: #FFFFFF;
  --charcoal: #1E1F24;
  --muted: #545151;
  --accent-periwinkle: #5163FF;
  --accent-sage: #44B77B;
  --accent-rose: #FA7599;
  --accent-amber: #F08F2E;
  --border-subtle: rgba(226, 232, 240, 0.7);
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--canvas);
  color: var(--charcoal);
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #1E1F24;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}
/**
 * Ankitify Live Polls - Stylesheet
 * Matching DirectPoll / Slido / MentiMeter modern presentation
 * Compatible with AI with Ankitify theme
 */

.ankitify-poll-wrapper {
  margin: 2rem 0;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: #1E1F24;
}

/* Tabs Navigation (DirectPoll style) */
.ankitify-poll-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: -1px;
  padding: 0 1rem;
}

.ankitify-poll-tabs-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ankitify-poll-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #64748B;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ankitify-poll-tab:hover {
  color: #1E1F24;
}

.ankitify-poll-tab.is-active {
  color: #0284C7;
  border-bottom-color: #0284C7;
}

.ankitify-poll-tab-edit {
  color: #94A3B8;
  font-weight: 500;
}

.ankitify-poll-tab-edit:hover {
  color: #5163FF;
}

.ankitify-live-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: ankitify-pulse 2s infinite;
}

@keyframes ankitify-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.ankitify-poll-tabs-right {
  display: flex;
  align-items: center;
}

.ankitify-poll-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 600;
  text-transform: uppercase;
  color: #64748B;
  background: #F1F5F9;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid #E2E8F0;
}

.ankitify-sync-spinner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
}

.ankitify-poll-sync-indicator.is-syncing .ankitify-sync-spinner {
  background-color: #0284C7;
  animation: ankitify-spin 0.8s linear infinite;
}

@keyframes ankitify-spin {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* Poll Main Card */
.ankitify-poll-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.ankitify-poll-meta-top {
  margin-bottom: 0.625rem;
}

.ankitify-poll-event-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748B;
  letter-spacing: -0.01em;
}

/* Badges Row */
.ankitify-poll-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.ankitify-poll-qnumber {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0284C7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ankitify-poll-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}

.ankitify-badge-running {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.ankitify-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #16A34A;
}

.ankitify-badge-closed {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.ankitify-badge-draft {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

/* Question Heading */
.ankitify-poll-question {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1E1F24;
  line-height: 1.35;
  margin: 0 0 1.75rem 0;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .ankitify-poll-question {
    font-size: 1.5rem;
  }
}

/* Results View (DirectPoll Bars) */
.ankitify-results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ankitify-result-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.ankitify-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ankitify-result-label {
  font-size: 1rem;
  font-weight: 500;
  color: #1E1F24;
}

.ankitify-result-percentage {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1E1F24;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono, ui-monospace, monospace);
  min-width: 3.5rem;
  text-align: right;
}

.ankitify-result-track {
  width: 100%;
  height: 9px;
  background-color: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.ankitify-result-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: width;
}

.ankitify-result-micro {
  display: flex;
  justify-content: flex-end;
}

.ankitify-result-votecount {
  font-size: 0.6875rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: #94A3B8;
}

/* Voting View */
.ankitify-panel-hidden {
  display: none !important;
}

.ankitify-vote-instruction {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 1rem;
}

.ankitify-vote-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ankitify-vote-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 0.75rem;
  color: #1E1F24;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ankitify-vote-btn:hover {
  background: #FFFFFF;
  border-color: var(--opt-color, #5163FF);
  box-shadow: 0 4px 12px -2px rgba(81, 99, 255, 0.12);
  transform: translateY(-1px);
}

.ankitify-vote-btn:active {
  transform: translateY(0);
}

.ankitify-vote-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.ankitify-vote-text {
  flex: 1;
}

.ankitify-vote-action-icon {
  font-size: 1.125rem;
  color: #94A3B8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ankitify-vote-btn:hover .ankitify-vote-action-icon {
  color: var(--opt-color, #5163FF);
  transform: translateX(3px);
}

.ankitify-vote-btn.is-selected {
  background: #EEF2FF;
  border-color: #5163FF;
}

/* Footer Section */
.ankitify-poll-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #F1F5F9;
  font-size: 0.8125rem;
  color: #64748B;
}

.ankitify-poll-total {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ankitify-poll-total strong {
  color: #1E1F24;
}

.ankitify-voted-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #15803D;
  background: #DCFCE7;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ankitify-hidden {
  display: none !important;
}

/* Empty State */
.ankitify-poll-empty {
  padding: 2rem;
  text-align: center;
  background: #F8FAFC;
  border-radius: 1rem;
  border: 1px dashed #CBD5E1;
  color: #64748B;
  font-size: 0.875rem;
}

/* Custom Logo responsive presentation */
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.custom-logo {
  max-height: 40px;
  width: auto;
  height: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}
.custom-logo:hover {
  transform: scale(1.02);
}
@media (max-width: 640px) {
  .custom-logo {
    max-height: 32px;
    max-width: 190px;
  }
}
