/* Custom styles */
.card {
  border: none;
  border-radius: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  font-weight: 500;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.password-toggle {
  cursor: pointer;
  border-left: none;
}

.password-toggle:hover {
  background-color: #e9ecef;
}

.input-group .form-control:focus + .btn {
  border-color: #667eea;
}

/* Smooth transitions */
.btn,
.form-control {
  transition: all 0.3s ease;
}

nav {
  background-color: #29444a;
}

@media (max-width: 588px) {
  nav {
    background-color: #29444a;
    border-radius: 0;
  }
}

/* Inactive tabs */
#screen-tab .nav-link {
  color: black; /* default inactive text color */
  background-color: transparent;
  font-weight: normal;
  text-decoration: none;
}

/* Active tab highlight */
#screen-tab .nav-link.active {
  color: white !important; /* text color on highlight */
  background-color: #28a745 !important; /* Bootstrap green */
  font-weight: bold;
  text-decoration: underline;
  border-radius: 5px 5px 0 0; /* optional rounded top corners */
}

/* Optional: use a lighter green highlight */
#screen-tab .nav-link.active.light-green {
  background-color: #90ee90 !important; /* light green */
  color: #004d00 !important; /* dark green text for contrast */
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.5rem;
}

/* Attachment Modal */
.attachment-modal-content {
  max-width: 800px;
  max-height: 90vh;
}

.attachment-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  min-height: 300px;
}

.attachment-full-preview {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem;
  background: #f9fafb;
  border-radius: 8px;
  min-width: 300px;
}

.file-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.file-name {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2937;
  text-align: center;
  word-break: break-all;
  max-width: 400px;
}

.file-type {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.attachment-actions {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  width: 100%;
  justify-content: center;
}

/* Custom styles for modals and loaders */
.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.custom-modal.active {
  display: flex;
}

.custom-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-loader {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9998;
  align-items: center;
  justify-content: center;
}

.modal-loader.active {
  display: flex;
}

.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}

.status-online {
  background-color: #28a745;
}

.status-offline {
  background-color: #dc3545;
}

.attachment-full-preview {
  max-width: 100%;
  max-height: 400px;
  display: block;
  margin: 0 auto;
}

.file-preview {
  text-align: center;
  padding: 20px;
}

.file-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.attachment-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-attachment {
  background: none;
  border: 1px solid #ddd;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-attachment:hover {
  background-color: #f8f9fa;
}

/* Camera */
#camera-view {
  width: 100%;
  max-width: 100%;
  border-radius: 4px;
  background: #000;
}

.camera-controls {
  margin-top: 1rem;
  text-align: center;
}
