/* 
 * Cando.FORMS - Default Theme
 * Based on the original site styling with gray backgrounds and blue accents
 */

/* CSS Variables for theme customization */
:root {
  /* Primary Colors */
  --theme-primary: #2c3e50;
  --theme-primary-light: #34495e;
  --theme-primary-dark: #1a252f;
  
  /* Background Colors */
  --theme-bg-body: #f4f4f4;
  --theme-bg-main: #f4f4f4;
  --theme-bg-content: #ffffff;
  --theme-bg-sidebar: #d0cfce;
  --theme-bg-header: #2c3e50;

  /* Sidebar text colors */
  --theme-text-sidebar: #050505;
  --theme-text-header: #ffffff;
  
  /* Text Colors */
  --theme-text-primary: #2c3e50;
  --theme-text-secondary: #7f8c8d;
  --theme-text-light: #ffffff;
  --theme-text-muted: #95a5a6;
  
  /* Border Colors */
  --theme-border-color: #ddd;
  --theme-border-light: #ecf0f1;
  
  /* Status Colors */
  --theme-success: #27ae60;
  --theme-warning: #f39c12;
  --theme-danger: #e74c3c;
  --theme-info: #3498db;
  
  /* Font Sizes */
  --theme-font-base: 16px;
  --theme-font-sidebar: 16.5px;
  --theme-font-title: 1.8rem;
}

/* Logo */
.s-site-logo-img {
  content: url(/Content/Images/logo-96.png);
}

/* Sidebar Header */
.s-sidebar-header {
  background-color: var(--theme-bg-header) !important;
}

/* Page Titles */
.grid-title,
.panel-titlebar {
  color: var(--theme-text-primary) !important;
  font-size: var(--theme-font-title) !important;
  font-weight: 600 !important;
}

/* Translation Grid Custom Text */
.s-TranslationGrid input.custom-text {
  width: 100%;
  height: 23px;
  padding: 0 3px;
}

/* Permission Check Editor */
.s-PermissionCheckEditor {
  min-height: 450px;
}

/* Base Font Sizes */
html, body {
  font-size: var(--theme-font-base) !important;
  background-color: var(--theme-bg-body) !important;
}

/* Sidebar Typography */
.s-sidebar,
.s-sidebar-pane,
.s-sidebar-link,
.s-sidebar-header-link {
  font-size: var(--theme-font-sidebar) !important;
}

/* Main Content Area */
.s-main {
  background-color: var(--theme-bg-main) !important;
}

/* Content Areas */
.content {
  background-color: var(--theme-bg-content);
}

/* Form Controls */
.form-control {
  border-color: var(--theme-border-color);
}

.form-control:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* Buttons */
.btn-primary {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
}

.btn-primary:hover {
  background-color: var(--theme-primary-dark);
  border-color: var(--theme-primary-dark);
}

/* Cards and Panels */
.panel,
.card {
  border-color: var(--theme-border-color);
  background-color: var(--theme-bg-content);
}

.panel-heading,
.card-header {
  background-color: var(--theme-border-light);
  border-bottom-color: var(--theme-border-color);
}

/* Tables */
.table {
  background-color: var(--theme-bg-content);
}

.table thead th {
  border-bottom-color: var(--theme-border-color);
  background-color: var(--theme-border-light);
}

.table td, .table th {
  border-top-color: var(--theme-border-light);
}

/* Sidebar Styling */
.s-sidebar {
  background-color: var(--theme-bg-sidebar) !important;
}

.s-sidebar-pane {
  background-color: var(--theme-bg-sidebar) !important;
}

.s-sidebar-link {
  color: var(--theme-text-sidebar) !important;
}

.s-sidebar-link:hover {
  background-color: var(--theme-primary-light) !important;
  color: var(--theme-text-light) !important;
}

.s-sidebar-link:focus {
  color: var(--theme-text-sidebar) !important;
}

.s-sidebar-link:visited {
  color: var(--theme-text-sidebar) !important;
}

/* Navigation */
.s-navigation-item {
  background-color: transparent !important;
}

.s-navigation-item.selected {
  background-color: var(--theme-primary-light) !important;
}

.s-navigation-item a {
  color: var(--theme-text-sidebar) !important;
}

.s-navigation-item a:hover {
  color: var(--theme-text-light) !important;
}

/* Sidebar Header */
.s-sidebar-header a {
  color: var(--theme-text-header) !important;
}

/* All sidebar text elements */
.s-sidebar * {
  color: var(--theme-text-sidebar) !important;
}

.s-sidebar .s-navigation-caption {
  color: var(--theme-text-sidebar) !important;
}

.s-sidebar .s-navigation-link {
  color: var(--theme-text-sidebar) !important;
}

.s-sidebar .s-navigation-link:hover {
  background-color: var(--theme-primary-light) !important;
  color: var(--theme-text-light) !important;
}

/* Grid Styling */
.slick-header-column {
  background-color: var(--theme-border-light);
  border-color: var(--theme-border-color);
}

.slick-cell {
  border-color: var(--theme-border-light);
}

/* Dialog and Modal Styling */
.ui-dialog {
  background-color: var(--theme-bg-content);
  border-color: var(--theme-border-color);
}

.ui-dialog-titlebar {
  background-color: var(--theme-border-light);
  border-bottom-color: var(--theme-border-color);
}

/* Theme Selector Dropdown */
.s-theme-selector-link {
  color: var(--theme-text-light) !important;
}

.s-theme-selector-link:hover {
  color: var(--theme-text-light) !important;
  opacity: 0.8;
}

.s-theme-selector-menu {
  min-width: 200px;
  background-color: var(--theme-bg-content) !important;
  border: 1px solid var(--theme-border-color) !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.s-theme-selector-menu .dropdown-header {
  color: var(--theme-text-primary) !important;
  font-weight: 600;
  border-bottom: 1px solid var(--theme-border-light);
  margin-bottom: 0.5rem;
}

.s-theme-selector-menu .dropdown-item {
  color: var(--theme-text-primary) !important;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.s-theme-selector-menu .dropdown-item:hover {
  background-color: var(--theme-primary-light) !important;
  color: var(--theme-text-light) !important;
}

.s-theme-selector-menu .dropdown-item i.fa-check {
  color: var(--theme-success) !important;
}

.s-theme-selector-menu .dropdown-item:hover i.fa-check {
  color: var(--theme-text-light) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  html, body {
    font-size: 14px !important;
  }
  
  .grid-title,
  .panel-titlebar {
    font-size: 1.5rem !important;
  }
}