/* Calculator Specific Styles */

.ptc-calculator {
  background: var(--ptc-surface);
  border-radius: var(--ptc-radius-16);
  box-shadow: var(--ptc-shadow-md);
  border: 1px solid var(--ptc-border);
  overflow: hidden;
  margin-bottom: var(--ptc-space-40);
  position: relative;
  transition: var(--ptc-transition);
}

.ptc-calculator:hover {
  box-shadow: var(--ptc-shadow-lg);
}

.ptc-calculator__header {
  padding: var(--ptc-space-24) var(--ptc-space-32);
  border-bottom: 1px solid var(--ptc-border);
  background: var(--ptc-background);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ptc-calculator__header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--ptc-font-body);
}

.ptc-calculator__body {
  padding: var(--ptc-space-32);
  gap: var(--ptc-space-32);
}

.ptc-calculator__form {
  display: flex;
  flex-direction: column;
  gap: var(--ptc-space-24);
}

.ptc-calculator__input-group {
  display: flex;
  flex-direction: column;
  gap: var(--ptc-space-8);
}

.ptc-calculator__label {
  font-weight: 600;
  color: var(--ptc-primary);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ptc-calculator__label-tip {
  font-weight: 400;
  color: var(--ptc-muted);
  font-size: 0.8rem;
}

.ptc-calculator__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.ptc-calculator__prefix {
  position: absolute;
  left: var(--ptc-space-16);
  color: var(--ptc-muted);
  font-weight: 700;
  font-size: 0.9rem;
  pointer-events: none;
  font-family: var(--ptc-font-body);
  transition: var(--ptc-transition);
}

.ptc-calculator__input,
.ptc-calculator__select {
  width: 100%;
  padding: var(--ptc-space-12) var(--ptc-space-16);
  border: 1px solid var(--ptc-border);
  border-radius: var(--ptc-radius-8);
  font-family: var(--ptc-font-body);
  font-size: 1rem;
  color: var(--ptc-text);
  background-color: var(--ptc-surface);
  transition: var(--ptc-transition);
  -webkit-appearance: none;
  appearance: none;
}

.ptc-calculator__input.has-prefix {
  padding-left: 3.25rem;
}

/* Styled Select Arrow */
.ptc-calculator__select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.ptc-calculator__input:focus,
.ptc-calculator__select:focus {
  outline: none;
  border-color: var(--ptc-accent);
  box-shadow: 0 0 0 3px rgba(200, 148, 42, 0.15);
}

.ptc-calculator__input:focus + .ptc-calculator__prefix {
  color: var(--ptc-accent);
}

.ptc-calculator__input::-webkit-outer-spin-button,
.ptc-calculator__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ptc-calculator__input[type=number] {
  -moz-appearance: textfield;
}

/* Premium Radio Selector Cards */
.ptc-calculator__radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ptc-space-16);
}

.ptc-calculator__radio-label {
  display: flex;
  flex-direction: column;
  padding: var(--ptc-space-16);
  border: 1px solid var(--ptc-border);
  border-radius: var(--ptc-radius-8);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--ptc-transition);
  position: relative;
  align-items: flex-start;
  background: var(--ptc-background);
}

.ptc-calculator__radio-label input {
  accent-color: var(--ptc-accent);
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
  width: 18px;
  height: 18px;
}

.ptc-calculator__radio-label:has(input:checked) {
  border-color: var(--ptc-accent);
  background: var(--ptc-surface);
  box-shadow: var(--ptc-shadow-sm), var(--ptc-shadow-glow);
  font-weight: 600;
}

.ptc-calculator__radio-title {
  color: var(--ptc-primary);
  font-weight: 600;
  margin-bottom: var(--ptc-space-4);
  font-size: 0.95rem;
}

.ptc-calculator__radio-desc {
  color: var(--ptc-muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
}

.ptc-calculator__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ptc-space-12);
  margin-top: var(--ptc-space-8);
}

/* Results Display Box */
.ptc-calculator__result-container {
  background: linear-gradient(135deg, var(--ptc-primary) 0%, #0c1c2e 100%);
  color: white;
  padding: var(--ptc-space-32);
  border-radius: var(--ptc-radius-12);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ptc-calculator__result-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200, 148, 42, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.ptc-calculator__result-box {
  text-align: center;
  margin-bottom: var(--ptc-space-24);
}

.ptc-calculator__result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--ptc-space-8);
  font-weight: 700;
}

.ptc-calculator__result-value {
  font-family: var(--ptc-font-mono);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--ptc-accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ptc-calculator__result-breakdown {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--ptc-space-20);
  display: flex;
  flex-direction: column;
  gap: var(--ptc-space-12);
}

.ptc-calculator__breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  padding-bottom: var(--ptc-space-8);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.ptc-calculator__breakdown-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ptc-calculator__breakdown-row span:first-child {
  color: rgba(255, 255, 255, 0.7);
}

.ptc-calculator__breakdown-row span:last-child {
  font-family: var(--ptc-font-mono);
  font-weight: 600;
  color: white;
}

/* Tax Slab Tables */
.ptc-table-wrapper {
  overflow-x: auto;
  margin: var(--ptc-space-32) 0;
  box-shadow: var(--ptc-shadow-sm);
  border-radius: var(--ptc-radius-12);
  border: 1px solid var(--ptc-border);
  background: white;
}

.ptc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.ptc-table th, .ptc-table td {
  padding: var(--ptc-space-16) var(--ptc-space-20);
  border-bottom: 1px solid var(--ptc-border);
  font-size: 0.925rem;
}

.ptc-table th {
  background-color: var(--ptc-background);
  font-weight: 700;
  color: var(--ptc-primary);
  white-space: nowrap;
  border-bottom: 2px solid var(--ptc-border);
}

.ptc-table tbody tr:last-child td {
  border-bottom: none;
}

.ptc-table tbody tr {
  transition: var(--ptc-transition);
}

.ptc-table tbody tr:hover {
  background-color: rgba(26, 60, 94, 0.02);
}

.ptc-table td:nth-child(n+2) {
  font-family: var(--ptc-font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ────────────────────────────────────────────────────────
   Widget Styling: Super Tax Widget & Tax Filer Checker
   ──────────────────────────────────────────────────────── */

/* Common Sidebar Widget Improvements */
.ptc-sidebar__widget {
  background: var(--ptc-surface);
  border-radius: var(--ptc-radius-12);
  padding: var(--ptc-space-24);
  border: 1px solid var(--ptc-border);
  box-shadow: var(--ptc-shadow-sm);
  transition: var(--ptc-transition);
}

.ptc-sidebar__widget:hover {
  box-shadow: var(--ptc-shadow-md);
  border-color: var(--ptc-border-hover);
}

.ptc-sidebar__title {
  margin-top: 0;
  margin-bottom: var(--ptc-space-20);
  color: var(--ptc-primary);
  border-left: 3px solid var(--ptc-accent);
  padding-left: var(--ptc-space-12);
  line-height: 1.2;
}

/* 1. Super Tax Widget Styling */
.widget_super_tax, 
.ptc-super-tax-widget {
  border-top: 4px solid var(--ptc-accent);
}

.ptc-super-tax__form {
  display: flex;
  flex-direction: column;
  gap: var(--ptc-space-16);
}

.ptc-super-tax__result {
  margin-top: var(--ptc-space-20);
  background: linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%);
  border-radius: var(--ptc-radius-8);
  padding: var(--ptc-space-16);
  color: white;
  border-left: 3px solid var(--ptc-accent);
  display: none; /* revealed via active class */
  animation: fadeIn 0.3s ease-out;
}

.ptc-super-tax__result.is-visible {
  display: block;
}

.ptc-super-tax__val-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  margin-bottom: var(--ptc-space-4);
  font-weight: 600;
}

.ptc-super-tax__val-num {
  font-family: var(--ptc-font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ptc-accent);
  margin-bottom: var(--ptc-space-8);
}

.ptc-super-tax__info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: var(--ptc-space-8);
}

.ptc-super-tax__info-row span:last-child {
  font-weight: 600;
  color: white;
}

.ptc-super-tax__progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  margin-top: var(--ptc-space-12);
  overflow: hidden;
}

.ptc-super-tax__progress-bar {
  height: 100%;
  background: var(--ptc-accent);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Tax Filer Checker Widget Styling */
.widget_filer_checker,
.ptc-filer-checker-widget {
  border-top: 4px solid var(--ptc-success);
}

.ptc-filer-checker__form {
  display: flex;
  flex-direction: column;
  gap: var(--ptc-space-16);
}

.ptc-filer-checker__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.ptc-filer-checker__input-wrapper svg,
.ptc-filer-checker__input-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--ptc-muted);
  pointer-events: none;
}

.ptc-filer-checker__input {
  padding-left: 36px;
}

.ptc-filer-checker__error {
  font-size: 0.8rem;
  color: var(--ptc-danger);
  margin-top: -8px;
  display: none;
}

.ptc-filer-checker__result {
  margin-top: var(--ptc-space-20);
  display: none;
  animation: slideDown 0.3s ease-out;
}

.ptc-filer-checker__result.is-visible {
  display: block;
}

.ptc-filer-checker__badge {
  display: flex;
  align-items: center;
  gap: var(--ptc-space-8);
  padding: var(--ptc-space-12);
  border-radius: var(--ptc-radius-8);
  font-weight: 700;
  font-size: 0.95rem;
  justify-content: center;
  margin-bottom: var(--ptc-space-12);
  box-shadow: var(--ptc-shadow-sm);
}

.ptc-filer-checker__badge.is-active {
  background: rgba(29, 122, 79, 0.1);
  color: var(--ptc-success);
  border: 1px solid rgba(29, 122, 79, 0.25);
}

.ptc-filer-checker__badge.is-inactive {
  background: rgba(192, 57, 43, 0.1);
  color: var(--ptc-danger);
  border: 1px solid rgba(192, 57, 43, 0.25);
}

.ptc-filer-checker__meta {
  background: var(--ptc-background);
  border-radius: var(--ptc-radius-8);
  padding: var(--ptc-space-12);
  font-size: 0.8rem;
  color: var(--ptc-text);
  border: 1px solid var(--ptc-border);
}

.ptc-filer-checker__meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--ptc-space-6);
}

.ptc-filer-checker__meta-row:last-child {
  margin-bottom: 0;
}

.ptc-filer-checker__meta-row span:first-child {
  color: var(--ptc-muted);
}

.ptc-filer-checker__meta-row span:last-child {
  font-weight: 600;
}

.ptc-filer-checker__sms-box {
  margin-top: var(--ptc-space-16);
  border-top: 1px dashed var(--ptc-border);
  padding-top: var(--ptc-space-16);
}

.ptc-filer-checker__sms-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ptc-primary);
  margin-bottom: var(--ptc-space-6);
}

.ptc-filer-checker__sms-snippet {
  background: #1e293b;
  color: #f8fafc;
  padding: var(--ptc-space-8) var(--ptc-space-12);
  border-radius: var(--ptc-radius-6);
  font-family: var(--ptc-font-mono);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.ptc-filer-checker__sms-copy {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: var(--ptc-space-4);
  border-radius: var(--ptc-radius-6);
  transition: var(--ptc-transition);
}

.ptc-filer-checker__sms-copy:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
