/* ============================================
   Dividend Calculator WordPress Plugin
   Style Sheet v1.0.0
   ============================================ */

/* ── Reset & Base ── */
.divcalc-wrapper * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.divcalc-wrapper {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 820px;
  margin: 0 auto 40px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

/* ── Header ── */
.divcalc-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f6ecd 60%, #0ea5e9 100%);
  padding: 36px 32px 28px;
  text-align: center;
  color: #ffffff;
}
.divcalc-theme-green .divcalc-header {
  background: linear-gradient(135deg, #064e3b 0%, #059669 60%, #10b981 100%);
}
.divcalc-theme-purple .divcalc-header {
  background: linear-gradient(135deg, #3b0764 0%, #7c3aed 60%, #8b5cf6 100%);
}
.divcalc-header-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  display: block;
}
.divcalc-title {
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin: 0 0 8px !important;
  line-height: 1.2 !important;
}
.divcalc-subtitle {
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Tabs ── */
.divcalc-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
}
.divcalc-tab {
  flex: 1;
  padding: 14px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.divcalc-tab:hover { color: #0f6ecd; background: rgba(15,110,205,0.05); }
.divcalc-tab.active { color: #0f6ecd; border-bottom-color: #0f6ecd; background: #fff; }
.divcalc-theme-green .divcalc-tab.active { color: #059669; border-bottom-color: #059669; }
.divcalc-theme-purple .divcalc-tab.active { color: #7c3aed; border-bottom-color: #7c3aed; }

/* ── Tab Content ── */
.divcalc-tab-content {
  display: none;
  padding: 28px;
}
.divcalc-tab-content.active { display: block; }

/* ── Form Grid ── */
.divcalc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 600px) {
  .divcalc-form-grid { grid-template-columns: 1fr; }
  .divcalc-results-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ── Fields ── */
.divcalc-field { display: flex; flex-direction: column; gap: 6px; }
.divcalc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.divcalc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.divcalc-prefix, .divcalc-suffix {
  position: absolute;
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  pointer-events: none;
}
.divcalc-prefix { left: 12px; }
.divcalc-suffix { right: 12px; }
.divcalc-input-wrap .divcalc-prefix ~ .divcalc-input {
  padding-left: 30px;
}
.divcalc-input {
  width: 100%;
  padding: 11px 36px 11px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -moz-appearance: textfield;
}
.divcalc-input::-webkit-outer-spin-button,
.divcalc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.divcalc-input:focus {
  border-color: #0f6ecd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15,110,205,0.12);
}
.divcalc-theme-green .divcalc-input:focus { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,0.12); }
.divcalc-theme-purple .divcalc-input:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.divcalc-select { padding: 11px 14px; cursor: pointer; }

/* ── Slider ── */
.divcalc-slider-section { margin-bottom: 24px; }
.divcalc-range {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  margin: 10px 0 6px;
  -webkit-appearance: none;
  appearance: none;
}
.divcalc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f6ecd, #0ea5e9);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15,110,205,0.4);
}
.divcalc-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ── Results Grid ── */
.divcalc-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.divcalc-result-card {
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.divcalc-result-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.divcalc-result-icon { font-size: 1.4rem; margin-bottom: 6px; }
.divcalc-result-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.88; margin-bottom: 6px; }
.divcalc-result-value { font-size: 1.4rem; font-weight: 800; line-height: 1; }

.divcalc-card-blue   { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.divcalc-card-green  { background: linear-gradient(135deg, #059669, #10b981); }
.divcalc-card-purple { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.divcalc-card-orange { background: linear-gradient(135deg, #d97706, #f59e0b); }
.divcalc-card-red    { background: linear-gradient(135deg, #dc2626, #ef4444); }
.divcalc-card-teal   { background: linear-gradient(135deg, #0d9488, #14b8a6); }

/* ── Reset Button ── */
.divcalc-reset-btn {
  display: block;
  margin: 4px auto 0;
  padding: 9px 22px;
  background: transparent;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.divcalc-reset-btn:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }

/* ── Advanced Results ── */
.divcalc-advanced-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.divcalc-adv-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.divcalc-adv-label { font-size: 0.82rem; color: #64748b; font-weight: 500; }
.divcalc-adv-value { font-size: 1rem; font-weight: 800; color: #1e293b; }

/* ── DRIP ── */
.divcalc-drip-info {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 22px;
}
.divcalc-drip-icon { font-size: 2.2rem; }
.divcalc-drip-title { font-size: 1rem; font-weight: 700; color: #0c4a6e; margin-bottom: 4px; }
.divcalc-drip-desc { font-size: 0.82rem; color: #0369a1; }
.divcalc-drip-compare {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-top: 20px;
  flex-wrap: wrap;
}
.divcalc-drip-col {
  flex: 1;
  min-width: 180px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
}
.divcalc-drip-col-active {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}
.divcalc-drip-col-title { font-size: 0.9rem; font-weight: 700; color: #1e293b; margin-bottom: 14px; }
.divcalc-drip-vs {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: #94a3b8;
}
.divcalc-drip-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.83rem;
}
.divcalc-drip-stat:last-child { border-bottom: none; }
.divcalc-drip-stat span { color: #64748b; }
.divcalc-drip-stat strong { color: #1e293b; font-weight: 700; }
.divcalc-positive { color: #059669 !important; }

/* ── Chart ── */
.divcalc-chart-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.divcalc-chart-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}
.divcalc-chart-btn:hover { border-color: #0f6ecd; color: #0f6ecd; }
.divcalc-chart-btn.active { background: #0f6ecd; border-color: #0f6ecd; color: #fff; }
.divcalc-chart-wrap {
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.divcalc-chart-note { font-size: 0.78rem; color: #94a3b8; text-align: center; }

/* ── Admin Page ── */
.divcalc-admin-wrap { max-width: 900px; }
.divcalc-admin-title {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin-bottom: 20px !important;
}
.divcalc-admin-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 30px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.divcalc-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.divcalc-admin-field { display: flex; flex-direction: column; gap: 8px; }
.divcalc-admin-field label { font-weight: 600; font-size: 0.85rem; color: #374151; }
.divcalc-admin-actions { border-top: 1px solid #e2e8f0; padding-top: 20px; margin-bottom: 30px; }
.divcalc-save-btn { background: #0f6ecd !important; border-color: #0f6ecd !important; border-radius: 8px !important; padding: 8px 24px !important; font-weight: 600 !important; }
.divcalc-shortcode-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.divcalc-shortcode-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: #1e293b; }
.divcalc-shortcode-box h4 { font-size: 0.88rem; font-weight: 700; margin: 16px 0 8px; color: #374151; }
.divcalc-shortcode-box code {
  display: block;
  background: #1e293b;
  color: #7dd3fc;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 6px;
  font-family: 'Courier New', monospace;
}
.divcalc-attr-table { font-size: 0.82rem !important; border-radius: 8px; overflow: hidden; }
.divcalc-attr-table th { background: #0f6ecd !important; color: #fff !important; }
.divcalc-attr-table td { vertical-align: middle !important; }
