.mpcl-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  color: #1e293b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
}

.mpcl-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Search Controls Card */
.mpcl-search-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mpcl-search-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.mpcl-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mpcl-search-group {
  flex: 2;
  min-width: 240px;
}

.mpcl-category-group,
.mpcl-setting-group {
  flex: 1;
  min-width: 180px;
}

.mpcl-action-group {
  min-width: 120px;
}

.mpcl-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.mpcl-input,
.mpcl-select {
  height: 44px;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: inherit;
  box-sizing: border-box;
  width: 100%;
}

.mpcl-input:focus,
.mpcl-select:focus {
  outline: 2px solid #0284c7;
  outline-offset: 1px;
  border-color: #0284c7;
}

.mpcl-btn {
  height: 44px;
  min-height: 44px;
  padding: 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.mpcl-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.mpcl-btn-secondary:hover {
  background: #cbd5e1;
}

/* Presets Row */
.mpcl-presets-row {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.mpcl-presets-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-right: 0.25rem;
}

.mpcl-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mpcl-pill-btn {
  height: 44px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.mpcl-pill-btn:hover {
  background: #e2e8f0;
}

.mpcl-pill-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Primary Content Grid */
.mpcl-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .mpcl-content-grid {
    grid-template-columns: 1fr;
  }
}

/* Procedure Card */
.mpcl-proc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mpcl-card-header {
  display: flex;
  flex-direction: column;
}

.mpcl-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mpcl-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mpcl-badge-cpt {
  background: #e0f2fe;
  color: #0369a1;
}

.mpcl-badge-category {
  background: #f1f5f9;
  color: #475569;
}

.mpcl-badge-part {
  background: #dcfce7;
  color: #166534;
}

.mpcl-proc-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.mpcl-proc-desc {
  font-size: 1rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

/* Cost Breakdown Grid */
.mpcl-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.mpcl-cost-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.mpcl-cost-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.mpcl-cost-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.mpcl-cost-value.highlight {
  color: #0284c7;
}

.mpcl-cost-value.warning {
  color: #b45309;
}

.mpcl-cost-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* Section Components */
.mpcl-section {
  display: flex;
  flex-direction: column;
}

.mpcl-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #0f172a;
}

.mpcl-section-desc {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0 0 1rem;
}

/* Table Styling */
.mpcl-table-wrap {
  overflow-x: auto;
}

.mpcl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.mpcl-table th {
  background: #f8fafc;
  padding: 0.75rem 0.85rem;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
}

.mpcl-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.mpcl-table tr.highlight-row {
  background: #f0f9ff;
}

.mpcl-badge-copay {
  font-weight: 700;
  color: #b45309;
}

/* Specs Grid */
.mpcl-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.mpcl-spec-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mpcl-spec-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.mpcl-spec-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
}

/* Sidebar Styles */
.mpcl-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mpcl-side-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mpcl-side-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.mpcl-side-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1rem;
}

/* Calculator Form */
.mpcl-calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mpcl-calc-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mpcl-calc-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.mpcl-calc-select {
  height: 44px;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: inherit;
  box-sizing: border-box;
}

.mpcl-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #334155;
}

.mpcl-radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 28px;
}

.mpcl-calc-summary {
  margin-top: 0.5rem;
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.mpcl-sum-row {
  display: flex;
  justify-content: space-between;
  color: #475569;
}

.mpcl-sum-row.total {
  padding-top: 0.4rem;
  border-top: 1px solid #cbd5e1;
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
}

.mpcl-sum-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #0369a1;
  line-height: 1.4;
  background: #e0f2fe;
  padding: 0.5rem;
  border-radius: 6px;
}

/* Rights List */
.mpcl-rights-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #475569;
}

.mpcl-rights-list li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.4;
}

.mpcl-rights-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #0284c7;
  font-weight: bold;
}

/* Filtered Procedures Directory */
.mpcl-proc-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.mpcl-proc-item {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: background-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.mpcl-proc-item:hover {
  background: #e2e8f0;
}

.mpcl-proc-item.active {
  background: #e0f2fe;
  border-color: #0284c7;
}

.mpcl-item-code {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
}

.mpcl-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
}

.mpcl-item-cost {
  font-size: 0.78rem;
  color: #64748b;
}

/* Ad Containers */
.mpcl-ad-container {
  min-height: 280px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 1.5rem 0;
}

/* In-Cluster Links */
.mpcl-related-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
}

.mpcl-related-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #0f172a;
}

.mpcl-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.mpcl-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.mpcl-related-card:hover {
  border-color: #0284c7;
}

.mpcl-related-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0284c7;
}

.mpcl-related-desc {
  font-size: 0.82rem;
  color: #64748b;
}

.mpcl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
