/**
 * Modern UI styling for dashboard, API configuration, and bot controller pages
 * Path: /TB/app/static/css/modern-ui.css
 */

/* CSS variables now consolidated in style.css */

/* Modern card styles */
.glass-effect,
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.glass-effect:hover,
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  border-color: #363C4E;
}

/* Gradient text styling */
.gradient-text,
.card-title,
.section-title {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

/* Button styling */
.btn-primary,
.btn-verify,
.btn-accent {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: none;
  color: #121212;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 255, 163, 0.3);
  transition: all 0.3s ease;
  border-radius: 12px;
}

.btn-primary:hover,
.btn-verify:hover,
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 163, 0.4);
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.btn-outline-secondary,
.btn-outline-accent {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  transition: all 0.3s ease;
  border-radius: 12px;
}

.btn-outline-secondary:hover,
.btn-outline-accent:hover {
  background: rgba(0, 200, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 200, 255, 0.25);
}

.btn-danger {
  background: linear-gradient(135deg, #ff3737, #ff5757);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 55, 55, 0.3);
  transition: all 0.3s ease;
  border-radius: 12px;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 55, 55, 0.4);
  background: linear-gradient(135deg, #ff5757, #ff3737);
}

/* Form input styling */
input[type="text"],
input[type="password"],
input[type="email"],
.form-control,
.form-select {
  background: rgba(26, 31, 44, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--primary-text);
  border-radius: 10px;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 255, 163, 0.25);
  background: rgba(26, 31, 44, 0.6);
}

/* Table styling */
.table-custom,
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
  color: var(--primary-text);
}

.table-custom thead th,
.table thead th {
  border: none;
  color: var(--secondary-text);
  font-weight: 500;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: rgba(26, 31, 44, 0.4);
}

.table-custom tbody tr,
.table tbody tr {
  background: rgba(26, 31, 44, 0.2);
  transition: all 0.3s ease;
}

.table-custom tbody tr:hover,
.table tbody tr:hover {
  background: rgba(26, 31, 44, 0.4);
  transform: translateY(-2px);
}

.table-custom tbody td,
.table tbody td {
  border: none;
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

/* Badge styling */
.badge,
.summary-badge {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-custom.success,
.badge-success,
.badge.bg-success {
  background: rgba(0, 255, 163, 0.1) !important;
  color: var(--primary-color) !important;
  border-color: rgba(0, 255, 163, 0.3) !important;
}

.badge-custom.danger,
.badge-danger,
.badge.bg-danger {
  background: rgba(255, 55, 55, 0.1) !important;
  color: var(--error-color) !important;
  border-color: rgba(255, 55, 55, 0.3) !important;
}

.badge-custom.warning,
.badge-warning,
.badge.bg-warning {
  background: rgba(255, 170, 0, 0.1) !important;
  color: var(--warning-color) !important;
  border-color: rgba(255, 170, 0, 0.3) !important;
}

.badge-custom.neutral,
.badge-neutral {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--secondary-text) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Alert styling */
.alert {
  border-radius: 12px;
  padding: 15px 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(0, 255, 163, 0.1) !important;
  color: var(--primary-color) !important;
  border-color: rgba(0, 255, 163, 0.3) !important;
}

.alert-danger,
.alert-error {
  background: rgba(255, 55, 55, 0.1) !important;
  color: var(--error-color) !important;
  border-color: rgba(255, 55, 55, 0.3) !important;
}

.alert-warning {
  background: rgba(255, 170, 0, 0.1) !important;
  color: var(--warning-color) !important;
  border-color: rgba(255, 170, 0, 0.3) !important;
}

/* List group styling */
.list-group-item {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  border-radius: 0 !important;
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Profile styling - Updated to match header.css with blue theme */
.profile-photo {
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #2563eb !important;
}

.profile-photo:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

/* Loading animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile (max-width: 480px) specific styling */
@media (max-width: 480px) {
  /* Remove borders and background for a cleaner look */
  .glass-effect,
  .card {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  
  /* Use subtle separators instead of borders */
  .card-header,
  .card-footer,
  .list-group-item,
  .table thead th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    padding: 12px 8px !important;
  }
  
  /* Adjust paddings */
  .container,
  .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Adjust spacing between sections */
  .mb-4 {
    margin-bottom: 12px !important;
  }
  
  /* Make cards flow to the edge of the screen */
  .card,
  .glass-effect {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Keep table styles minimal but readable */
  .table,
  .table-custom {
    font-size: 0.9rem;
  }
  
  .table th,
  .table-custom th {
    padding: 8px 4px !important;
  }
  
  .table td,
  .table-custom td {
    padding: 8px 4px !important;
  }
}