/* ══════════════════════════════
   VARIANT 4 STYLES - ADAPTED
   Loan Detail Tab Redesign
══════════════════════════════ */

/* Container for the tabs */
.v4-nav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0;
  overflow-x: auto;
  /* Allow scrolling if they don't fit, but user wants them inline */
  white-space: nowrap;
}

/* Individual Tab Button Style */
.v4-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .14s;
  font-family: 'DM Sans', sans-serif;
  /* Ensuring font consistency if available, else standard */
  white-space: nowrap;

  /* Resetting DevExtreme button defaults if applied via class */
  border-radius: 0;
  box-shadow: none;
}

.v4-tab:hover {
  color: #374151;
  background-color: transparent;
}

.v4-tab.active {
  color: #059669;
  /* Green accent */
  border-bottom-color: #059669;
  font-weight: 600;
}

/* 
   DevExtreme Button specific overrides when using .v4-tab class 
   dx-button renders a div with content, we need to target that 
*/
.v4-tab.dx-button {
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -1px;
}

.v4-tab.dx-button.dx-state-hover {
  background-color: transparent !important;
  color: #374151 !important;
}

.v4-tab.dx-button.dx-state-active,
.v4-tab.dx-button.dx-state-focused {
  background-color: transparent !important;
  border-color: transparent !important;
}

/* The active state managed by our logic */
.v4-tab.active.dx-button {
  color: #059669 !important;
  border-bottom-color: #059669 !important;
}

.v4-tab.active.dx-button .dx-button-content {
  color: #059669 !important;
}


/* Installments Filter Section */
.v4-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 18px;
  border: 1px solid #f3f4f6;
  flex-wrap: wrap;
}

.v4-filter-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #9ca3af;
  white-space: nowrap;
}

/* Radio Group Styling */
.dx-radiogroup.v4-radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.dx-radiogroup.v4-radio-group .dx-radio-value-container {
  padding-right: 15px;
}

.dx-radiogroup.v4-radio-group .dx-radiobutton-icon::before {
  border: 1px solid #d1d5db;
  /* Default border */
}

.dx-radiogroup.v4-radio-group .dx-radiobutton-checked .dx-radiobutton-icon::before {
  border-color: #059669;
  /* Green border when checked */
}

.dx-radiogroup.v4-radio-group .dx-radiobutton-checked .dx-radiobutton-icon .dx-radiobutton-icon-dot {
  background: #059669;
  /* Green dot */
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dx-radiogroup.v4-radio-group .dx-item-content {
  font-size: 13px;
  color: #6b7280;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
}

.dx-radiogroup.v4-radio-group .dx-radiobutton-checked+.dx-item-content {
  color: #059669;
  font-weight: 600;
}