/* Simulador de Rentabilidade Specific Styles */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background-color: #218838;
  transform: scale(1.05);
}

.mobile-menu-toggle i {
  font-size: 20px;
}

/* Hide hamburger button when sidebar is open */
.mobile-menu-toggle.hide {
  display: none !important;
}

/* Mobile close button (X) in sidebar */
.mobile-close-btn {
  display: none;
  color: #dc3545;
  font-size: 22px;
  padding: 5px 10px;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
}

.mobile-close-btn:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #c82333;
  transform: scale(1.1);
}

.mobile-close-btn i {
  font-weight: bold;
}

/* Desktop toggle button (chevron) */
.desktop-toggle-btn {
  display: block;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

.rentabilidade-section {
  background-color: #f8f9fa;
  min-height: calc(100vh - 250px);
}

/* Form Card */
.rentabilidade-section .card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: 100%;
}

.rentabilidade-section .card-title {
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.2rem;
}

.rentabilidade-section .form-label {
  font-weight: 500;
  color: #495057;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.rentabilidade-section .form-control,
.rentabilidade-section .form-select {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.rentabilidade-section .form-control:focus,
.rentabilidade-section .form-select:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

/* Submit Button */
.rentabilidade-section .btn-success {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.rentabilidade-section .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Results Container */
.results-container {
  min-height: 500px;
  width: 100%;
  display: block;
  /* Removed flex to prevent centering issues with large content */
}

/* Empty State */
.empty-state {
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.empty-state i {
  opacity: 0.3;
}

.empty-state p {
  font-size: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Results Content */
#resultsContent {
  width: 100%;
  padding: 1.5rem !important;
  background-color: white;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Results Header */
.results-header {
  margin-bottom: 2rem;
}

.results-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0;
}

#novaSimulacaoBtn {
  border-radius: 8px;
  font-weight: 500;
  color: #495057;
  border-color: #dee2e6;
  background-color: #f8f9fa;
  padding: 0.5rem 1rem;
}

#novaSimulacaoBtn:hover {
  background-color: #e9ecef;
}

/* Banks Row */
.bank-card-compact {
  background-color: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bank-card-compact:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: #28a745;
}

.bank-name {
  color: #28a745;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1f3f5;
  padding-bottom: 0.75rem;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.2;
}

.parcela-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.parcela-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1400px) {
  .parcela-value {
    font-size: 1.3rem;
  }
}

.taxa-info {
  font-size: 0.8rem;
  color: #6c757d;
}

.total-info {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Alert Box */
.alert-box {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  border-left: 4px solid #ffc107;
}

.alert-box i {
  color: #ffc107;
  font-size: 1.25rem;
}

.alert-box p {
  margin: 0;
  font-size: 0.9rem;
  color: #6c757d;
}

/* Detalhamento Section */
.detalhamento-section {
  margin-top: 2rem;
}

.detalhamento-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 1.5rem;
}

.detalhamento-table {
  width: 100%;
  border-collapse: collapse;
}

.detalhamento-table th {
  text-align: left;
  padding: 1rem;
  font-weight: 500;
  color: #9ea7ad;
  border-bottom: 1px solid #f1f3f5;
  font-size: 0.9rem;
}

.detalhamento-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #f1f3f5;
  color: #495057;
  vertical-align: middle;
}

.detalhamento-table .bank-name-cell {
  font-weight: 700;
  color: #000;
}

.detalhamento-table .parcela-cell {
  font-weight: 500;
}

/* Responsive */
@media (max-width: 991px) {
  .banks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 250px !important;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  /* Hide desktop toggle button on mobile */
  .sidebar .desktop-toggle-btn {
    display: none !important;
  }

  /* Show mobile close button when sidebar is open */
  .sidebar.show .mobile-close-btn {
    display: block;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .main-content.sidebar-collapsed {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .header {
    padding: 1rem !important;
  }

  .header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .banks-grid {
    grid-template-columns: 1fr;
  }

  .results-container {
    min-height: auto;
  }

  #resultsContent {
    padding: 1rem !important;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .mobile-close-btn {
    display: none !important;
  }

  .desktop-toggle-btn {
    display: block !important;
  }
}