/* ============================================================
   EMBED CALCULATOR — Lightweight styles for blog embeds
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #FBF9F7;
  color: #2D2A26;
  padding: 20px 16px;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.embed-calc {
  max-width: 380px;
  margin: 0 auto;
}

.embed-title {
  font-size: 18px;
  font-weight: 700;
  color: #D35233;
  margin-bottom: 18px;
}

/* --- Field Groups --- */
.field-group {
  margin-bottom: 14px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #8A8580;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Inputs --- */
.field-input {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid #EDEAE6;
  border-radius: 10px;
  background: white;
  color: #2D2A26;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.field-input:focus {
  border-color: #D35233;
}

.field-input.grow {
  flex: 1;
}

/* Remove number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Select sizing */
.currency-select {
  width: 130px;
  flex-shrink: 0;
}

.days-select {
  width: 54px;
  text-align: center;
  flex-shrink: 0;
}

.freq-input {
  width: 54px;
  text-align: center;
  flex-shrink: 0;
}

.period-select {
  width: 88px;
  flex-shrink: 0;
}

/* Inline labels */
.inline-text {
  font-size: 14px;
  color: #6B6560;
  white-space: nowrap;
}

/* Currency badge next to price input */
.currency-badge {
  font-size: 13px;
  font-weight: 600;
  color: #D35233;
  background: #FFF0EB;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Calculate Button --- */
.embed-btn {
  width: 100%;
  padding: 12px;
  background: #D35233;
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s, transform 0.1s;
}

.embed-btn:hover {
  background: #B8432A;
}

.embed-btn:active {
  transform: scale(0.98);
}

/* --- Result Area --- */
.embed-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  animation: fadeIn 0.3s ease;
}

.result-ok {
  background: #F0F9F4;
  border: 1.5px solid #B8E6CC;
}

.result-warning {
  background: #FFF5F0;
  border: 1.5px solid #F5C4B0;
}

.result-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.result-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-title.warning {
  color: #D35233;
}

.result-text {
  font-size: 13px;
  line-height: 1.6;
  color: #4A4540;
}

.result-text strong {
  color: #2D2A26;
}

.result-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #2D2A26;
  margin: 14px 0 10px;
}

/* --- Savings Plan Cards (one-time calculator) --- */
.savings-cards {
  display: flex;
  gap: 8px;
}

.savings-card {
  flex: 1;
  background: #F5F3F0;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
}

.savings-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8A8580;
  margin-bottom: 4px;
}

.savings-months {
  font-size: 26px;
  font-weight: 800;
  color: #D35233;
  line-height: 1.1;
}

.savings-months span {
  font-size: 11px;
  font-weight: 500;
  color: #6B6560;
}

.savings-detail {
  font-size: 10px;
  color: #6B6560;
  margin-top: 3px;
  line-height: 1.3;
}

.result-footer {
  font-size: 13px;
  color: #6B6560;
  margin-top: 12px;
  text-align: center;
}

/* --- Validation Shake --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.shake {
  animation: shake 0.4s ease;
  border-color: #D35233 !important;
}

/* --- Fade In --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
