/* Estilos del Plugin de Gestión de Visitantes */
.condo-visitor-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.condo-visitor-form {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 5px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.condo-visitor-form h2 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #f0f0f1;
  padding-bottom: 10px;
}

.condo-visitor-form-group {
  margin-bottom: 20px;
}

.condo-visitor-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.condo-visitor-form-group input,
.condo-visitor-form-group select,
.condo-visitor-form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

.condo-visitor-form-group input:focus,
.condo-visitor-form-group select:focus,
.condo-visitor-form-group textarea:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 0 1px #0073aa;
}

.condo-visitor-form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.condo-visitor-form-col {
  flex: 1;
  padding: 0 10px;
  min-width: 250px;
}

.condo-visitor-radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.condo-visitor-radio-option {
  display: flex;
  align-items: center;
  gap: 5px;
}

.condo-visitor-radio-option input {
  width: auto;
}

.condo-visitor-btn {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.3s;
}

.condo-visitor-btn:hover {
  background: #005a87;
}

.condo-visitor-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.condo-visitor-toggle {
  background: #f0f0f1;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
}

.condo-visitor-toggle.active {
  background: #0073aa;
  color: #fff;
}

.condo-visitor-section {
  margin-bottom: 30px;
}

.condo-visitor-section h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 1px solid #f0f0f1;
  padding-bottom: 10px;
}

.condo-visitor-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.condo-visitor-table th,
.condo-visitor-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e1e1;
}

.condo-visitor-table th {
  background: #f0f0f1;
  font-weight: 600;
}

.condo-visitor-table tr:hover {
  background: #f9f9f9;
}

.condo-visitor-alert {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.condo-visitor-alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.condo-visitor-alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.condo-visitor-validation-result {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 5px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.condo-visitor-validation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e1e1e1;
}

.condo-visitor-validation-title {
  margin: 0;
  color: #333;
}

.condo-visitor-validation-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.condo-visitor-info-item {
  margin-bottom: 10px;
}

.condo-visitor-info-label {
  font-weight: 600;
  color: #555;
}

.condo-visitor-info-value {
  color: #333;
}

.condo-visitor-search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.condo-visitor-search-container input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.condo-visitor-search-container button {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

/* Estilos responsivos */
@media (max-width: 768px) {
  .condo-visitor-container {
    padding: 10px;
  }
  
  .condo-visitor-form {
    padding: 15px;
  }
  
  .condo-visitor-form-row {
    flex-direction: column;
    margin: 0;
  }
  
  .condo-visitor-form-col {
    padding: 0;
    min-width: 100%;
    margin-bottom: 15px;
  }
  
  .condo-visitor-radio-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .condo-visitor-table {
    display: block;
    overflow-x: auto;
  }
  
  .condo-visitor-search-container {
    flex-direction: column;
  }
  
  .condo-visitor-validation-info {
    grid-template-columns: 1fr;
  }
}

/* Estilos para la lista de visitantes frecuentes */
.condo-visitor-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.condo-visitor-status-active {
  color: #28a745;
  font-weight: 600;
  background: #d4edda;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.condo-visitor-status-inactive {
  color: #dc3545;
  font-weight: 600;
  background: #f8d7da;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.condo-visitor-btn-small {
  padding: 6px 12px;
  font-size: 12px;
  margin: 0 2px;
}

.condo-visitor-loading {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

.condo-visitor-no-data {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
  background: #f8f9fa;
  border-radius: 4px;
  margin: 10px 0;
}

.condo-visitor-error {
  text-align: center;
  padding: 20px;
  color: #dc3545;
  background: #f8d7da;
  border-radius: 4px;
  margin: 10px 0;
}

/* Estilos para el formulario de registro de llegada */
#arrival-registration-form {
  background: #f8f9fa;
  border: 1px solid #e1e1e1;
  border-radius: 5px;
  padding: 20px;
  margin-top: 15px;
}

#arrival-registration-form h4 {
  margin-top: 0;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

#arrival-registration-form .condo-visitor-form-group {
  margin-bottom: 15px;
}

#arrival-registration-form label {
  display: inline-block;
  margin-right: 20px;
  font-weight: normal;
  cursor: pointer;
}

#arrival-registration-form input[type="radio"] {
  margin-right: 5px;
}

#vehicle-plate-field {
  margin-top: 10px;
}

#vehicle-plate-field input {
  text-transform: uppercase;
}

/* Estilos para las tablas con información de vehículos */
.condo-visitor-table th,
.condo-visitor-table td {
  text-align: center;
  vertical-align: middle;
}

.condo-visitor-table th:nth-child(1),
.condo-visitor-table td:nth-child(1) {
  text-align: left;
}

.condo-visitor-table th:nth-child(3),
.condo-visitor-table td:nth-child(3) {
  text-align: left;
}

/* Estilos para formularios de llegada integrados */
.arrival-form-container {
  background: #f8f9fa;
  border: 1px solid #e1e1e1;
  border-radius: 5px;
  padding: 20px;
  margin-top: 15px;
}

.arrival-form-container h4 {
  margin-top: 0;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.arrival-form-container .condo-visitor-form-group {
  margin-bottom: 15px;
}

.arrival-form-container label {
  display: inline-block;
  margin-right: 20px;
  font-weight: normal;
  cursor: pointer;
}

.arrival-form-container input[type="radio"] {
  margin-right: 5px;
}

.arrival-form-container .vehicle-plate-field-* {
  margin-top: 10px;
}

.arrival-form-container input[type="text"] {
  text-transform: uppercase;
}

/* Estilos para botón deshabilitado */
.register-arrival-btn:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.register-arrival-btn:disabled:hover {
  background-color: #6c757d;
  border-color: #6c757d;
}

/* Estilos para botón primario */
.condo-visitor-btn-primary {
  background-color: #007cba;
  border-color: #007cba;
  color: white;
}

.condo-visitor-btn-primary:hover {
  background-color: #005a87;
  border-color: #005a87;
}

.condo-visitor-btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.condo-visitor-btn-secondary:hover {
  background-color: #545b62;
  border-color: #545b62;
}

/* Estilos para modal */
.condo-visitor-modal {
  display: none !important;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.condo-visitor-modal.show {
  display: block !important;
}

.condo-visitor-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border: none;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

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

.condo-visitor-modal-header {
  background-color: #007cba;
  color: white;
  padding: 20px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.condo-visitor-modal-header h3 {
  margin: 0;
  font-size: 1.5em;
}

.condo-visitor-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.condo-visitor-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.condo-visitor-modal-body {
  padding: 30px;
}

.condo-visitor-modal-footer {
  padding: 20px 30px;
  background-color: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Responsive para modal */
@media (max-width: 768px) {
  .condo-visitor-modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .condo-visitor-modal-header {
    padding: 15px;
  }
  
  .condo-visitor-modal-header h3 {
    font-size: 1.3em;
  }
  
  .condo-visitor-modal-body {
    padding: 20px;
  }
  
  .condo-visitor-modal-footer {
    padding: 15px 20px;
    flex-direction: column;
  }
  
  .condo-visitor-modal-footer .condo-visitor-btn {
    width: 100%;
    margin: 5px 0;
  }
}

@media (max-width: 480px) {
  .condo-visitor-modal-content {
    width: 98%;
    margin: 5% auto;
  }
  
  .condo-visitor-modal-header {
    padding: 12px;
  }
  
  .condo-visitor-modal-header h3 {
    font-size: 1.2em;
  }
  
  .condo-visitor-modal-body {
    padding: 15px;
  }
  
  .condo-visitor-modal-footer {
    padding: 12px 15px;
  }
}

/* Estilos para autocompletado */
.condo-visitor-autocomplete-container {
  position: relative;
  width: 100%;
}

.condo-visitor-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.condo-visitor-suggestion-item {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.condo-visitor-suggestion-item:hover {
  background-color: #f8f9fa;
}

.condo-visitor-suggestion-item:last-child {
  border-bottom: none;
}

.condo-visitor-suggestion-item strong {
  color: #333;
  font-size: 14px;
}

.condo-visitor-suggestion-item small {
  color: #666;
  font-size: 12px;
}

.condo-visitor-no-results,
.condo-visitor-error {
  padding: 12px 15px;
  color: #666;
  font-style: italic;
  text-align: center;
}

.condo-visitor-error {
  color: #dc3545;
}

/* Responsive para autocompletado */
@media (max-width: 768px) {
  .condo-visitor-suggestions {
    max-height: 150px;
  }
  
  .condo-visitor-suggestion-item {
    padding: 10px 12px;
  }
}

/* Estilos para mensajes */
.condo-visitor-message {
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

.condo-visitor-message-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.condo-visitor-message-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

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

/* Estilos para paginación */
.condo-visitor-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.condo-visitor-pagination button {
  padding: 8px 16px;
  font-size: 14px;
}

.condo-visitor-pagination span {
  font-weight: 500;
  color: #666;
}

/* Responsive para paginación */
@media (max-width: 768px) {
  .condo-visitor-pagination {
    flex-direction: column;
    gap: 10px;
  }
  
  .condo-visitor-pagination button {
    width: 100%;
    max-width: 200px;
  }
}