@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Poppins:wght@400;500;600&display=swap');

/* ============================================
   CM to Inches Converter - by Yaseen
   ============================================ */

.cic-wrapper {
  max-width: 540px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Poppins', sans-serif;
  background: #ffffff;
}

/* Header */
.cic-header {
  text-align: center;
  margin-bottom: 28px;
}

.cic-badge {
  display: inline-block;
  background: #f0f9ff;
  border: 1px solid #0EA5E9;
  color: #0EA5E9;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.cic-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  background: linear-gradient(135deg, #0f172a 0%, #0EA5E9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
}

.cic-subtitle {
  color: #64748b;
  font-size: 0.85rem;
  font-family: 'Poppins', sans-serif;
  margin: 0 !important;
}

/* Card */
.cic-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.08);
}

/* Tabs */
.cic-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 22px;
}

.cic-tab {
  padding: 10px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.25s;
  color: #94a3b8;
  background: transparent;
}

.cic-tab.active {
  background: #0EA5E9;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

/* Input */
.cic-input-group {
  margin-bottom: 18px;
}

.cic-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
}

.cic-input-wrap {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cic-input-wrap:focus-within {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.cic-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 16px;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #0f172a;
  width: 100%;
}

.cic-input::placeholder { color: #cbd5e1; }

.cic-input-unit {
  padding: 13px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0EA5E9;
  font-family: 'Poppins', sans-serif;
  border-left: 2px solid #e2e8f0;
  background: #f0f9ff;
}

/* Quick buttons */
.cic-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cic-quick-btn {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}

.cic-quick-btn:hover {
  border-color: #0EA5E9;
  color: #0EA5E9;
  background: #f0f9ff;
}

/* Convert button */
.cic-convert-btn {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  border: none;
  background: #0EA5E9;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

.cic-convert-btn:hover {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.4);
}

.cic-convert-btn:active { transform: translateY(0); }

/* Result card */
.cic-result-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.08);
  display: none;
}

.cic-result-card.cic-show { display: block; }

.cic-section-label {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

.cic-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.cic-result-box {
  background: #334155;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.cic-res-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 500;
}

.cic-res-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  line-height: 1;
}

.cic-res-unit {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 5px;
  font-family: 'Poppins', sans-serif;
}

/* Bars */
.cic-bars { }
.cic-bar-item { margin-bottom: 12px; }
.cic-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cic-bar-meta span {
  font-size: 0.75rem;
  font-family: 'Poppins', sans-serif;
  color: #64748b;
  font-weight: 500;
}
.cic-bar-meta strong {
  font-size: 0.78rem;
  font-family: 'Poppins', sans-serif;
  color: #0f172a;
  font-weight: 600;
}
.cic-bar-track {
  background: #f1f5f9;
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}
.cic-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.cic-bar-cm { background: linear-gradient(90deg, #0EA5E9, #38bdf8); }
.cic-bar-in { background: linear-gradient(90deg, #334155, #64748b); }

/* Slider card */
.cic-slider-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.08);
}

.cic-slider-display {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.cic-slider-val {
  flex: 1;
  background: #334155;
  border-radius: 12px;
  padding: 12px 14px;
}

.cic-slabel {
  font-size: 0.65rem;
  color: #94a3b8;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.cic-snum {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  margin-top: 3px;
}

.cic-cm-color { color: #38bdf8 !important; }
.cic-in-color { color: #ffffff !important; }
.cic-frac-num { font-size: 0.88rem !important; }

/* Range slider */
.cic-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  margin: 14px 0 10px;
  cursor: pointer;
}

.cic-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0EA5E9;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.2);
  transition: box-shadow 0.2s;
}

.cic-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 8px rgba(14,165,233,0.2);
}

.cic-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0EA5E9;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.2);
}

.cic-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #94a3b8;
  font-family: 'Poppins', sans-serif;
}

/* Responsive */
@media (max-width: 480px) {
  .cic-title { font-size: 1.7rem; }
  .cic-result-grid { grid-template-columns: 1fr 1fr; }
  .cic-slider-display { flex-direction: column; }
  .cic-res-value { font-size: 1.4rem; }
}
