/* Mad Svc Plugin Styles */
.svc-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  font-family: inherit;
}

.svc-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 20px 0;
}

.svc-error-small {
  background-color: #f8d7da;
  color: #721c24;
  padding: 3px;
  border: 1px solid #f5c6cb;
  border-radius: 2px;
  margin: 5px 0;
}

.svc-payment-container {
  max-width: 63%;
  margin: 0 auto;
  padding: 20px;
  font-family: inherit;
  text-align: center;
  font-size: 1em;
  /*border: 1px solid black;*/
  /*padding-top: 2%;*/
  padding-bottom: 5%;
}

.svc-payment-container h2{
  font-size: 1.5em;
}


/* Filtros */
.svc-filters {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #dee2e6;
}

.svc-filters h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2em;
}

.filters-form {
  display: block;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
  flex: 1;
}

.filter-group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #555;
  font-size: 0.9em;
}

.filter-group input,
.filter-group select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
  transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Botões */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  font-weight: 500;
  text-align: center;
}

.btn-filter {
  background-color: #007cba;
  color: white;
}

.btn-filter:hover {
  background-color: #005a87;
}

.btn-clear {
  background-color: #6c757d;
  color: white;
  margin-left: 10px;
}

.btn-clear:hover {
  background-color: #545b62;
}

.btn-rent {
  background-color: #28a745;
  color: white;
  margin-right: 5px;
}

.btn-rent:hover {
  background-color: #218838;
}

.btn-inquiry {
  background-color: #17a2b8;
  color: white;
}

.btn-inquiry:hover {
  background-color: #138496;
}

.btn-submit {
  background-color: #007cba;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
}

.btn-submit:hover {
  background-color: #005a87;
}

/* Resultados */
.svc-results {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  flex-wrap: wrap;
  gap: 15px;
}

.results-count {
  font-weight: 600;
  color: #555;
}

/*
.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-controls label {
  font-weight: 600;
  color: #555;
  font-size: 0.9em;
}

.sort-controls select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
}
*/

/* Tabela */


.svc-error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background-color: white;
}

.svc-error-table th,
.svc-error-table td {
  padding: 12px 15px;
  text-align: center;
  /* border-bottom: 1px solid #dee2e6;*/
  vertical-align: middle;
}

.svc-error-table th {
  background-color: #f8f9fa;
  text-align: center;
  font-weight: 600;
  color: #555;
  position: sticky;
  top: 0;
  z-index: 10;
}



.properties-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.properties-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.25rem;
  background-color: white;
}

.properties-table th,
.properties-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

.properties-table th {
  background-color: #f8f9fa;
  text-align: center;
  font-weight: 600;
  color: #555;
  position: sticky;
  top: 0;
  z-index: 10;
}

.properties-table th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.3s ease;
}

.properties-table th.sortable:hover {
  background-color: #e9ecef;
}

.properties-table th.sortable:after {
  content: "↕";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  font-size: 12px;
}

.properties-table th.sortable.asc:after {
  content: "↑";
  opacity: 1;
}

.properties-table th.sortable.desc:after {
  content: "↓";
  opacity: 1;
}

.properties-table tr:hover {
  background-color: #f8f9fa;
}

.properties-table h4 {
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
}

.properties-table tr.rental-info {
  font-weight: 500;
  vertical-align: middle;
}

.table-rent {
  width: 63% !important;
  margin: auto;
}


.property-title strong {
  color: #333;
  font-size: 1.1em;
}

.property-title small {
  color: #666;
  font-style: italic;
  line-height: 1.3;
}


.price {
  font-weight: bold;
  color: #28a745;
  font-size: 1.1em;
}

.text-center {
  text-align: center;
}

.actions {
  white-space: nowrap;
  width: 1px;
}

.actions .btn {
  padding: 6px 12px;
  font-size: 12px;
  margin-right: 5px;
}

.actions .btn:last-child {
  margin-right: 0;
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  gap: 5px;
}

.page-btn {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  background-color: white;
  color: #007cba;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.page-btn:hover {
  background-color: #e9ecef;
}

.page-btn.active {
  background-color: #007cba;
  color: white;
  border-color: #007cba;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 17%;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-dialog {
  margin-top: 10px;
  margin: 30px auto;
  width: 1024px;
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 1024px;
  position: relative;
  animation: slideIn 0.3s ease;
}

.modal-terms {
  font-size: 16px;
  padding-left: 10px;
  padding-right: 10px;
  max-height: 480px;
  overflow: auto;
}

.modal-terms p{
  line-height: 1.2rem;
  padding-bottom: 0.8rem;
}

.modal-footer {
  text-align: right;
}


@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

button.close {
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 20px;
  line-height: 1;
}


.close:hover,
.close:focus {
  outline: none;
  color: #0D1728;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5em;
}

.modal h4 {
  font-size: 18px;
  text-align: center;
}

/* Formulário geral */
#rorsform {
  max-width: 83%;
  margin: 0 auto;
  padding: 2rem;
}

/* Form groups */
#rorsform .form-group {
  margin-bottom: 1.5rem;
}

/* Labels */
#rorsform label {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #0D1728;
}

#rorsform label .required {
  color: #d9534f;
  margin-left: 2px;
  font-size: 1.25rem;
}

#rorsform .form-group .error {
  color: #d9534f;
  margin-left: 2px;
  font-size: 1.15rem;
}

/* Inputs e textarea */
#rorsform .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.25rem;
  border: 2px solid #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background-color: #E5E5E5;
}

#rorsform .form-control:focus {
  border-color: #6E8AEE;
  outline: none;
}

#rorsform .form-control::placeholder {
  color: #0D1728;
  font-size: 1.15rem;
}

/* Textarea */
#rorsform textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Centralizar os botões do último grupo */
#rorsform .form-group.text-center {
  text-align: center;
}

/* Responsividade */
@media (max-width: 768px) {
  #rorsform {
    padding: 1.5rem;
  }

  #rorsform .btn-primary {
    width: 100%;
    margin: 0.5rem 0;
  }
}




/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.loading:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


/* -----------------------------
   Botão primário estilo Bootstrap
------------------------------ */
.btn-primary {
  display: inline-block;
  font-weight: 500;
  color: #ffffff;
  background-color: #0D1728;
  border: 1px solid #0D1728;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #87642E;
  border-color: #87642E;
  color: #ffffff;
  text-decoration: none;
}

.btn-primary:active {
  background-color: #6a5023;
  border-color: #6a5023;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(135, 100, 46, 0.5);
}

/* -----------------------------
   Tamanhos
------------------------------ */
.btn-primary.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.5rem;
}

.btn-primary.btn-m {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
}

.btn-primary.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

/* -----------------------------
   Estado desativado
------------------------------ */
.btn-primary:disabled,
.btn-primary.disabled {
  background-color: #0D1728;
  border-color: #0D1728;
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

/* -----------------------------
   Botão Rosa estilo Bootstrap
------------------------------ */

.btn-pink {
  background-color: #7D084F;
  color: #ffffff;
  border: none;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

/* Hover: tom mais escuro para contraste */
.btn-pink:hover {
  background-color: #5a0536;
  /* versão escura do rosa */
  color: #ffffff;
}

.btn-pink.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

.btn-pink.btn-m {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
}

.btn-pink.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.5rem;
}




/* -----------------------------
   Botão Roxo estilo Bootstrap
------------------------------ */

.btn-purple {
  background-color: #382564;
  color: #ffffff;
  border: none;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

/* Hover: tom mais claro para contraste */
.btn-purple:hover {
  background-color: #4b367a;
  /* versão mais clara do roxo */
  color: #ffffff;
}

/* tamanhos */
.btn-purple.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

.btn-purple.btn-m {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
}

.btn-purple.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.5rem;
}


/* -----------------------------
   Botão Vermelho estilo Bootstrap
------------------------------ */

.btn-red {
  background-color: #960018;
  color: #ffffff;
  border: none;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

/* Hover: tom mais claro para contraste */
.btn-red:hover {
  background-color: #b20020;
  /* versão mais clara do vermelho */
  color: #ffffff;
}

/* tamanhos */
.btn-red.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

.btn-red.btn-m {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.375rem;
}

.btn-red.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.5rem;
}





/* Responsividade */
@media (max-width: 768px) {
  .svc-container {
    padding: 10px;
  }

  .filter-row {
    flex-direction: column;
    gap: 10px;
  }

  .filter-group {
    min-width: 100%;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /*
  .sort-controls {
    flex-wrap: wrap;
    gap: 5px;
  }
*/
  .properties-table {
    font-size: 12px;
  }

  .properties-table th,
  .properties-table td {
    padding: 8px 10px;
  }

  .property-title strong {
    font-size: 1em;
  }

  .actions {
    white-space: normal;
  }

  .actions .btn {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    margin-right: 0;
  }

    .modal-dialog {
    width: 100% !important;
  }

  .modal-content {
    margin: 20px auto;
    /* dá espaçamento nas laterais */
    width: calc(100% - 40px);
    /* deixa 20px de cada lado */
    max-width: 400px;
    /* nunca ultrapassa 400px */
    height: auto;
    /* altura ajusta conforme o conteúdo */
    border-radius: 8px;
    /* mantém cantos arredondados */
    padding: 20px;
  }

  .modal-terms {
    max-height: 60vh;
    /* deixa rolável sem ultrapassar 60% da tela */
    overflow-y: auto;
    font-size: 13px;
  }

  .close {
    top: 0px;
    /* right: 0px; */
    font-size: 26px;
    position: absolute;
    /* ainda relativo ao modal */
    z-index: 1010;
    text-align: right;
  }

  .modal-footer {
    text-align: center;
    padding: 10px 0;
  }

  button {
    width: 90%;
    margin: 5px 0;
    font-size: 1rem;
    padding: 10px;
  }

  .table-rent {
    width: 100% !important;
  }

  /* Formulário geral */
  #rorsform {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  #rorsform label {
    font-size: 0.9rem;
  }

  #rorsform label .required {
    color: #d9534f;
    margin-left: 2px;
    font-size: 0.9rem;
  }

  #rorsform .form-group .error {
    color: #d9534f;
    margin-left: 2px;
    font-size: 0.9rem;
  }

  #rorsform .form-control {
    font-size: 0.9rem;
  }

  #rorsform .form-control::placeholder {
    color: #0D1728;
    font-size: 0.9rem;
  }

  .btn-primary.btn-m {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
  }


}

@media (max-width: 480px) {
  .properties-table-wrapper {
    font-size: 11px;
  }

  .properties-table th,
  .properties-table td {
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  .properties-table h4 {
    font-size: 0.9rem;
  }


  .btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 3px;
  }

  .page-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Formulário geral */
  #rorsform {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  #rorsform label {
    font-size: 0.9rem;
  }

  #rorsform label .required {
    color: #d9534f;
    margin-left: 2px;
    font-size: 0.9rem;
  }

  #rorsform .form-group .error {
    color: #d9534f;
    margin-left: 2px;
    font-size: 0.9rem;
  }

  #rorsform .form-control {
    font-size: 0.9rem;
  }

  #rorsform .form-control::placeholder {
    color: #0D1728;
    font-size: 0.9rem;
  }

  .btn-primary.btn-m {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
  }

  .svc-payment-container {
    max-width: 100%;
  }

}

/* Melhorias visuais */
.properties-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.properties-table tbody tr:hover {
  background-color: #e8f4f8;
  transition: background-color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.filter-group input[type="number"] {
  min-width: 100px;
}

.properties-table th {
  border-bottom: 2px solid #dee2e6;
}

/* Estados de loading e erro */
.table-loading {
  opacity: 0.6;
  pointer-events: none;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 20px 0;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 15px;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  margin: 20px 0;
}
