/* ======================================
   Calcly.uk Bright Theme (Light Mode)
   ====================================== */

:root {
  --calcly-primary: #1e66f5;
  --calcly-accent: #3b82f6;
  --calcly-bg: #ffffff;
  --calcly-card: #f9fafb;
  --calcly-text: #111827;
  --calcly-muted: #4b5563;
  --calcly-border: #e5e7eb;
  --calcly-shadow: rgba(0,0,0,0.08);
}

/* ===== GLOBAL RESET ===== */
.calcly-wrapper,
.calcly-wrapper * {
  box-sizing: border-box;
  color: var(--calcly-text) !important;
}

/* ===== WRAPPER ===== */
.calcly-wrapper {
  background: var(--calcly-bg) !important;
  border-radius: 16px;
  border: 1px solid var(--calcly-border);
  box-shadow: 0 6px 20px var(--calcly-shadow);
  padding: 28px;
  max-width: 1100px;
  margin: 30px auto;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* ===== HEADER ===== */
.calcly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.calcly-logo {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--calcly-primary), var(--calcly-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.calcly-subtitle {
  color: var(--calcly-muted);
  font-size: 15px;
}

/* ===== FORM ===== */
.calcly-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--calcly-card);
  border: 1px solid var(--calcly-border);
  border-radius: 14px;
  padding: 20px;
}

.calcly-field label {
  font-weight: 600;
  color: var(--calcly-text) !important;
  margin-bottom: 6px;
  display: block;
}

.calcly-input-wrap input[type="number"] {
  width: 100%;
  border: 1px solid var(--calcly-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--calcly-text);
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.calcly-input-wrap input[type="number"]:focus {
  border-color: var(--calcly-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30,102,245,0.25);
}

/* ===== RANGE ===== */
input[type="range"] {
  width: 100%;
  appearance: none;
  height: 6px;
  background: #dbeafe;
  border-radius: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--calcly-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(30,102,245,0.4);
}

/* ===== BUTTONS ===== */
.calcly-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.calcly-btn {
  background: linear-gradient(90deg, var(--calcly-primary), var(--calcly-accent));
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.calcly-btn:hover {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transform: translateY(-1px);
}
.calcly-btn.ghost {
  background: transparent !important;
  border: 2px solid var(--calcly-primary);
  color: var(--calcly-primary) !important;
}
.calcly-btn.ghost:hover {
  background: var(--calcly-primary) !important;
  color: #fff !important;
}

/* ===== RESULTS ===== */
.calcly-results .calcly-cards {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.calcly-card {
  background: #fff;
  border: 1px solid var(--calcly-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 3px 8px var(--calcly-shadow);
}
.calcly-card .label {
  color: var(--calcly-muted);
}
.calcly-card .value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  color: var(--calcly-primary);
}

/* ===== TABLE ===== */
.calcly-table-wrap {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--calcly-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 8px var(--calcly-shadow);
}
.calcly-table th,
.calcly-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--calcly-border);
  text-align: right;
  color: var(--calcly-text);
}
.calcly-table th {
  background: #f3f4f6;
  color: var(--calcly-muted);
  font-weight: 600;
}
.calcly-table td:first-child,
.calcly-table th:first-child {
  text-align: left;
}

/* ===== FOOTER ===== */
.calcly-footer {
  margin-top: 16px;
  color: var(--calcly-muted);
  font-size: 12px;
  line-height: 1.5;
}
.calcly-footer strong {
  color: var(--calcly-text);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .calcly-form {
    grid-template-columns: 1fr;
  }
}
