/* Scoped styles for CM to Inches Converter Plugin */
.ctic-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px;
  box-sizing: border-box;
  color: #0f172a;
}

.ctic-wrapper * {
  box-sizing: border-box;
}

.ctic-header {
  text-align: center;
  margin-bottom: 24px;
}

.ctic-icon {
  color: #14b8a6;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}

.ctic-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.ctic-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 16px;
}

/* Tabs */
.ctic-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.ctic-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.ctic-tab-btn:hover {
  color: #0f172a;
}

.ctic-tab-btn.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Tab Content */
.ctic-tab-content {
  display: none;
  animation: ctic-fade 0.3s ease;
}

.ctic-tab-content.active {
  display: block;
}

@keyframes ctic-fade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Converter Card */
.ctic-converter-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
}

.ctic-input-group {
  margin-bottom: 16px;
}

.ctic-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.ctic-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.ctic-input-wrapper input {
  width: 100%;
  padding: 16px 48px 16px 16px;
  font-size: 24px;
  font-family: monospace;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s;
  height: auto;
  line-height: normal;
}

.ctic-input-wrapper input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.ctic-unit {
  position: absolute;
  right: 16px;
  color: #94a3b8;
  font-family: monospace;
  font-size: 14px;
  pointer-events: none;
}

.ctic-copy-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 4px 0;
  transition: color 0.2s;
}

.ctic-copy-btn:hover {
  color: #14b8a6;
}

.ctic-divider {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.ctic-arrow-icon {
  background: #e2e8f0;
  color: #64748b;
  padding: 8px;
  border-radius: 50%;
  display: flex;
}

/* Info Box */
.ctic-info-box {
  margin-top: 24px;
  background: rgba(20, 184, 166, 0.05);
  border: 1px solid rgba(20, 184, 166, 0.1);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.ctic-info-icon {
  color: #14b8a6;
  flex-shrink: 0;
}

/* Table */
.ctic-table-container {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

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

.ctic-table th, .ctic-table td {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.ctic-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.ctic-table td {
  font-family: monospace;
  font-size: 16px;
  color: #334155;
}

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

.ctic-table tr:hover td {
  background: #f8fafc;
}

/* Footer */
.ctic-footer {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 24px;
}

/* Responsive */
@media (max-width: 480px) {
  .ctic-wrapper {
    padding: 20px;
  }
  .ctic-header h2 {
    font-size: 24px;
  }
}
