/* Modern SBA 504 Calculator Styles - 100% WordPress Compatible */
/* This CSS uses only traditional CSS properties that pass all WordPress validation */
/* No CSS Grid, Flexbox gap, or other modern properties that cause validation errors */
.sba504-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sba504-hero {
  text-align: center;
  margin-bottom: 40px;
  padding: 40px 0;
}



.sba504-hero h2 {
  margin: 0 0 16px 0;
  font-weight: 800;
  font-size: 36px;
  color: #1f2937;
  letter-spacing: -0.025em;
}

.sba504-hero p {
  margin: 0;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.sba504-grid {
  /* WordPress compatibility - using traditional layout approach */
  width: 100%;
  margin: 0;
  padding: 0;
}



/* WordPress compatibility - traditional layout */
.sba504-grid > * {
  margin-bottom: 32px;
}

/* Clearfix utility for floated elements */
.sba504-grid::after,
.row::after,
.structure::after,
.metrics3::after,
.tabs::after {
  content: "";
  display: table;
  clear: both;
}

@media (min-width: 1024px) {
  .sba504-grid {
    /* WordPress compatibility - traditional layout */
  }
  
  
  
  /* Legacy browser fallback */
  .sba504-grid > * {
    width: calc(50% - 16px);
    float: left;
    margin-right: 32px;
  }
  
  .sba504-grid > *:nth-child(2n) {
    margin-right: 0;
  }
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.08);
  overflow: hidden;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.card:hover {
  -webkit-transform: translateY(-4px);
  -ms-transform: translateY(-4px);
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(17, 24, 39, 0.12);
}

.card .hd {
  display: block;
  /* WordPress compatibility - fallback for older browsers */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  /* WordPress compatibility - using margin instead of gap */
  margin-right: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  color: #fff;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.card .hd svg {
  opacity: 0.9;
}

.left .hd {
  background: #5b6b80;
}

.right .hd {
  background: linear-gradient(135deg, #93b068, #7a9a4f);
}

.card .bd {
  padding: 32px 24px;
}

.row {
  /* WordPress compatibility - using traditional layout approach */
  width: 100%;
  margin-bottom: 24px;
}



/* WordPress compatibility - traditional layout */
.row > * {
  margin-bottom: 20px;
}

.row.two {
  /* WordPress compatibility - traditional layout */
}



/* WordPress compatibility - traditional layout */
.row.two > * {
  width: calc(50% - 10px);
  float: left;
  margin-right: 20px;
}

.row.two > *:nth-child(2n) {
  margin-right: 0;
}

@media (max-width: 640px) {
  .row.two > * {
    width: 100%;
    float: none;
    margin-right: 0;
  }
}

.field label {
  display: block;
  font-size: 14px;
  color: #374151;
  margin: 0 0 8px 2px;
  font-weight: 600;
}

.field input[type="text"], 
.field input[type="number"], 
.field select {
  width: 100%;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  font-size: 16px;
  outline: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.field input[type="text"]:focus, 
.field input[type="number"]:focus, 
.field select:focus {
  border-color: #93b068;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(147, 176, 104, 0.1);
}

.field .hint {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
  display: block;
}

.pill {
  display: inline-block;
  /* WordPress compatibility - fallback for older browsers */
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  /* WordPress compatibility - using margin instead of gap */
  margin-right: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  background: #f9fafb;
  color: #1f2937;
  font-weight: 700;
  font-size: 16px;
  border: 2px solid #93b068;
}

.pill .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #93b068;
}

.structure {
  /* WordPress compatibility - using traditional layout approach */
  width: 100%;
  margin-top: 24px;
  overflow: hidden;
}



/* WordPress compatibility - traditional layout */
.structure > * {
  width: calc(33.333% - 11px);
  float: left;
  margin-right: 16px;
  margin-bottom: 16px;
}

.structure > *:nth-child(3n) {
  margin-right: 0;
}

@media (max-width: 768px) {
  .structure > * {
    width: 100%;
    float: none;
    margin-right: 0;
  }
}

.cell {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  background: #f9fafb;
  text-align: center;
  transition: all 0.2s ease;
}

.cell:hover {
  border-color: #93b068;
  background: #f0f9ff;
}

/* Structure card colors matching the design */
.structure .cell:nth-child(1) {
  background: #93b068;
  border-color: #93b068;
}

.structure .cell:nth-child(2) {
  background: #5b6b80;
  border-color: #5b6b80;
}

.structure .cell:nth-child(3) {
  background: #d6935b;
  border-color: #d6935b;
}

.cell .t {
  font-size: 18px;
  color: white;
  margin-bottom: 8px;
  font-weight: 800;
}

.cell .a {
  font-weight: 800;
  font-size: 16px;
  color: white;
  margin-bottom: 4px;
}

.cell .p {
  font-size: 13px;
  color: white;
  font-weight: 600;
}

.metrics3 {
  /* WordPress compatibility - using traditional layout approach */
  width: 100%;
}



/* WordPress compatibility - traditional layout */
.metrics3 > * {
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .metrics3 > * {
    width: calc(33.333% - 11px);
    float: left;
    margin-right: 16px;
  }
  
  .metrics3 > *:nth-child(3n) {
    margin-right: 0;
  }
}

.kpi {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.kpi:hover {
  -webkit-transform: translateY(-2px);
  -ms-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.1);
}

.kpi.highlight {
  background: #dfeacf;
  border-color: #93b068;
  position: relative;
}

.kpi.highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #93b068, #7a9a4f);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.kpi.soft {
  background: #dfeacf;
  border-color: #86efac;
}

.kpi .k {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 600;
}

.kpi .v {
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
}

.tabs {
  /* WordPress compatibility - using traditional layout approach */
  width: 100%;
  margin-top: 24px;
  overflow: hidden;
}



/* WordPress compatibility - traditional layout */
.tabs > * {
  width: calc(50% - 6px);
  float: left;
  margin-right: 12px;
}

.tabs > *:nth-child(2n) {
  margin-right: 0;
}

.tab {
  padding: 14px 20px;
  text-align: center;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  color: #6b7280;
}

.tab:hover {
  background: #e5e7eb;
  color: #374151;
}

.tab.active {
  background: #f0f9ff;
  background: -webkit-linear-gradient(135deg, #f0f9ff, #e0f2fe);
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-color: #93b068;
  color: #1e40af;
  font-weight: 700;
}

.section {
  margin-top: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.section small {
  color: #6b7280;
  font-size: 13px;
}

.schedule-header {
  display: block;
  /* WordPress compatibility - fallback for older browsers */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn-excel {
  background: #217346;
  background: -webkit-linear-gradient(135deg, #217346, #1e6b3a);
  background: linear-gradient(135deg, #217346, #1e6b3a);
  border-color: #217346;
  font-size: 14px;
  padding: 12px 20px;
}

.btn-excel:hover {
  background: #1e6b3a;
  background: -webkit-linear-gradient(135deg, #1e6b3a, #217346);
  background: linear-gradient(135deg, #1e6b3a, #217346);
  box-shadow: 0 4px 16px rgba(33, 115, 70, 0.4);
}

.section small span {
  color: #93b068;
  font-weight: 600;
}

.tableWrap {
  overflow: auto;
  border-radius: 16px;
  margin-top: 16px;
  border: 2px solid #e5e7eb;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
}

thead th {
  background: #f3f4f6;
  background: -webkit-linear-gradient(135deg, #f3f4f6, #e5e7eb);
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  font-size: 13px;
  color: #374151;
  text-align: left;
  padding: 16px;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 700;
}

tbody td {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
}

tbody tr:hover {
  background: #f9fafb;
}

.shareRow {
  margin-top: 24px;
  display: block;
  /* WordPress compatibility - fallback for older browsers */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  /* WordPress compatibility - using margin instead of gap */
  margin-right: 16px;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.btn {
  display: inline-block;
  /* WordPress compatibility - fallback for older browsers */
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  /* WordPress compatibility - using margin instead of gap */
  margin-right: 10px;
  padding: 16px 24px;
  border-radius: 12px;
  border: 2px solid #93b068;
  background: #93b068;
  background: -webkit-linear-gradient(135deg, #93b068, #7a9a4f);
  background: linear-gradient(135deg, #93b068, #7a9a4f);
  color: white;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(147, 176, 104, 0.3);
}

.btn:hover {
  -webkit-transform: translateY(-2px);
  -ms-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(147, 176, 104, 0.4);
  background: #7a9a4f;
  background: -webkit-linear-gradient(135deg, #7a9a4f, #93b068);
  background: linear-gradient(135deg, #7a9a4f, #93b068);
}

.btn:active {
  -webkit-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
}

.btn svg {
  opacity: 0.9;
}

#shareUrl {
  color: #93b068;
  font-size: 13px;
  font-weight: 500;
}

/* Additional modern enhancements */
.field input[type="text"]::placeholder,
.field input[type="number"]::placeholder {
  color: #9ca3af;
}

/* Enhanced focus states for accessibility */
.field input[type="text"]:focus-visible, 
.field input[type="number"]:focus-visible, 
.field select:focus-visible,
.tab:focus-visible,
.btn:focus-visible {
  outline: 2px solid #93b068;
  outline-offset: 2px;
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

/* Loading states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  -webkit-transform: none;
  -ms-transform: none;
  transform: none;
}

/* Enhanced mobile experience */
@media (max-width: 480px) {
  .sba504-wrap {
    padding: 20px 16px;
  }
  
  .sba504-hero {
    padding: 24px 0;
  }
  
  .sba504-hero h2 {
    font-size: 28px;
  }
  
  .sba504-hero p {
    font-size: 16px;
  }
  
  .card .bd {
    padding: 24px 20px;
  }
  
  .card .hd {
    padding: 16px 20px;
    font-size: 16px;
  }
  
  .btn {
    padding: 14px 20px;
    font-size: 14px;
  }
  
  .schedule-header {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  
  .btn-excel {
    margin-top: 12px;
    width: 100%;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
}

/* Pagination Styles */
.pagination-controls {
  margin: 20px 0;
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.pagination-info {
  text-align: center;
  margin-bottom: 16px;
  font-weight: 600;
  color: #374151;
}

.pagination-buttons {
  /* WordPress compatibility - using traditional layout approach */
  width: 100%;
  margin-bottom: 16px;
  overflow: hidden;
}

.pagination-buttons > * {
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .pagination-buttons > * {
    width: calc(33.333% - 11px);
    float: left;
    margin-right: 16px;
  }
  
  .pagination-buttons > *:nth-child(3n) {
    margin-right: 0;
  }
}

.pagination-btn {
  display: inline-block;
  /* WordPress compatibility - fallback for older browsers */
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  /* WordPress compatibility - using margin instead of gap */
  margin-right: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #93b068;
  color: #93b068;
  background: #f0f9ff;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn svg {
  opacity: 0.8;
}

.page-numbers {
  text-align: center;
  /* WordPress compatibility - using traditional layout approach */
  width: 100%;
  overflow: hidden;
}

.page-numbers > * {
  display: inline-block;
  margin: 0 4px;
}

.page-number {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.page-number:hover {
  border-color: #93b068;
  color: #93b068;
  background: #f0f9ff;
}

.page-number.active {
  background: #93b068;
  border-color: #93b068;
  color: white;
}

.page-number.ellipsis {
  border: none;
  background: transparent;
  cursor: default;
  width: auto;
  padding: 0 8px;
}

.page-number.ellipsis:hover {
  background: transparent;
  color: #6b7280;
}

.rows-per-page {
  text-align: center;
}

.rows-per-page label {
  display: inline-block;
  margin-right: 8px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
}

.rows-per-page select {
  display: inline-block;
  padding: 8px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rows-per-page select:focus {
  border-color: #93b068;
  outline: none;
  box-shadow: 0 0 0 3px rgba(147, 176, 104, 0.1);
}

/* Print styles */
@media print {
  .sba504-wrap {
    max-width: none;
    padding: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .btn {
    display: none;
  }
  
  .pagination-controls {
    display: none;
  }
}
