/* BNR Loan Calculator Block Styles */

.bnr-lc-container {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Title */
.bnr-lc-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 24px 0;
  text-align: center;
}

/* Content Layout */
.bnr-lc-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

/* Input Section */
.bnr-lc-input-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bnr-lc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bnr-lc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bnr-lc-field label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

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

.bnr-lc-currency,
.bnr-lc-percentage {
  position: absolute;
  left: 12px;
  color: #666;
  font-weight: 500;
  z-index: 1;
  pointer-events: none;
}

.bnr-lc-percentage {
  right: 12px;
  left: auto;
}

.bnr-lc-input-wrapper input {
  width: 100%;
  padding: 12px 16px;
  padding-left: 24px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  background: #f8f9fa;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.bnr-lc-input-wrapper input:focus {
  outline: none;
  border-color: #007cba;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.bnr-lc-input-wrapper input[type="number"] {
  -moz-appearance: textfield;
}

.bnr-lc-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.bnr-lc-input-wrapper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bnr-lc-select-wrapper {
  position: relative;
}

.bnr-lc-select-wrapper select {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  background: #f8f9fa;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.bnr-lc-select-wrapper select:focus {
  outline: none;
  border-color: #007cba;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Trade-in Link */
.bnr-lc-trade-link {
  color: #007cba;
  text-decoration: none;
  font-size: 12px;
  margin-left: 8px;
  font-weight: 400;
}

.bnr-lc-trade-link:hover {
  text-decoration: underline;
}

/* Results Section */
.bnr-lc-results-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Payment Box */
.bnr-lc-payment-box {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.bnr-lc-payment-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

.bnr-lc-payment-amount {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.bnr-lc-payment-term {
  font-size: 14px;
  color: #666;
}

/* Loan Summary */
.bnr-lc-summary {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  overflow: hidden;
}

.bnr-lc-summary-header {
  background: #f8f9fa;
  padding: 16px 20px;
  border-bottom: 1px solid #e1e5e9;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #333;
}

.bnr-lc-summary-icon {
  color: #007cba;
  font-size: 12px;
}

.bnr-lc-summary-content {
  padding: 20px;
}

.bnr-lc-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f4;
}

.bnr-lc-summary-row:last-child {
  border-bottom: none;
}

.bnr-lc-summary-label {
  color: #666;
  font-size: 14px;
}

.bnr-lc-summary-value {
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.bnr-lc-summary-total {
  border-top: 2px solid #e1e5e9;
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 600;
}

.bnr-lc-summary-total .bnr-lc-summary-label,
.bnr-lc-summary-total .bnr-lc-summary-value {
  color: #333;
  font-weight: 600;
}

.bnr-lc-summary-payment {
  border-top: 1px solid #e1e5e9;
  margin-top: 8px;
  padding-top: 12px;
}

/* Disclaimer */
.bnr-lc-disclaimer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

.bnr-lc-disclaimer p {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.bnr-lc-disclaimer p:last-child {
  margin-bottom: 0;
}

/* Editor Styles */
.bnr-lc-editor-placeholder {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  background: #f9f9f9;
  min-height: 400px;
}

.bnr-lc-editor-preview {
  max-width: 100%;
}

.bnr-lc-preview-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
  text-align: center;
}

.bnr-lc-preview-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #ddd;
}

.bnr-lc-preview-left,
.bnr-lc-preview-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bnr-lc-preview-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bnr-lc-preview-field label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.bnr-lc-preview-input {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  color: #333;
}

.bnr-lc-preview-payment {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.bnr-lc-preview-payment-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.bnr-lc-preview-payment-amount {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 2px;
}

.bnr-lc-preview-payment-term {
  font-size: 12px;
  color: #666;
}

.bnr-lc-preview-summary {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  overflow: hidden;
}

.bnr-lc-preview-summary-header {
  background: #f8f9fa;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e5e9;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.bnr-lc-preview-summary-content {
  padding: 16px;
}

.bnr-lc-preview-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid #f1f3f4;
}

.bnr-lc-preview-summary-row:last-child {
  border-bottom: none;
}

.bnr-lc-preview-summary-total {
  border-top: 1px solid #e1e5e9;
  margin-top: 8px;
  padding-top: 8px;
  font-weight: 600;
}

.bnr-lc-preview-note {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin: 16px 0 0 0;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .bnr-lc-container {
    padding: 16px;
  }
  
  .bnr-lc-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .bnr-lc-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .bnr-lc-payment-amount {
    font-size: 28px;
  }
  
  .bnr-lc-preview-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .bnr-lc-container {
    padding: 12px;
  }
  
  .bnr-lc-title {
    font-size: 18px;
  }
  
  .bnr-lc-input-wrapper input,
  .bnr-lc-select-wrapper select {
    padding: 10px 14px;
    padding-left: 20px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .bnr-lc-payment-box {
    padding: 20px 16px;
  }
  
  .bnr-lc-payment-amount {
    font-size: 24px;
  }
  
  .bnr-lc-summary-content {
    padding: 16px;
  }
  
  .bnr-lc-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .bnr-lc-summary-value {
    font-weight: 600;
  }
}

/* Wide and Full Width Support */
.bnr-lc-container.alignwide {
  max-width: 1200px;
}

.bnr-lc-container.alignfull {
  max-width: 100%;
  margin: 0;
  border-radius: 0;
}

.bnr-lc-container.alignfull {
  padding: 32px;
}

@media (min-width: 1200px) {
  .bnr-lc-container.alignwide {
    padding: 32px;
  }
}

/* Print Styles */
@media print {
  .bnr-lc-container {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .bnr-lc-input-wrapper input,
  .bnr-lc-select-wrapper select {
    background: #fff !important;
    border: 1px solid #000 !important;
  }
}
