/* Custom Color Scheme */
:root {
  --primary-color: #006770;
  --secondary-color: #A9894C;
  --primary-light: #008B94;
  --primary-dark: #004A50;
  --secondary-light: #C4A570;
  --secondary-dark: #8B6F3A;
  --accent-color: #E8F4F5;
  --accent-secondary: #F5F2E8;
  --text-primary: #2C3E50;
  --text-secondary: #6C757D;
  --success-color: #28A745;
  --warning-color: #FFC107;
  --danger-color: #DC3545;
  --info-color: #17A2B8;
}

/* LTR Support and Enhanced Styling */
html {
  font-size: 14px;
  direction: ltr;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  direction: ltr;
  text-align: left;
}

/* LTR Form Controls */
.form-control, .form-select, .form-check-input {
  text-align: left;
  direction: ltr;
}

.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: left;
}

.form-floating > .form-control-plaintext:focus::placeholder, 
.form-floating > .form-control:focus::placeholder {
  text-align: left;
}

/* LTR Navigation */
.navbar-nav {
  direction: ltr;
}

.navbar-nav .nav-link {
  text-align: left;
}

/* LTR Tables */
.table {
  direction: ltr;
  text-align: left;
}

.table th, .table td {
  text-align: left;
}

/* LTR Cards */
.card {
  direction: ltr;
  text-align: left;
}

.card-header {
  text-align: left;
}

/* LTR Buttons */
.btn-group {
  direction: ltr;
}

/* LTR Dropdowns */
.dropdown-menu {
  text-align: left;
  direction: ltr;
}

/* LTR Modals */
.modal-content {
  direction: ltr;
  text-align: left;
}

.modal-header {
  text-align: left;
}

.modal-body {
  text-align: left;
}

.modal-footer {
  text-align: right; /* Keep buttons on the right */
}

/* LTR Progress Bars */
.progress {
  direction: ltr;
}

/* LTR Alerts */
.alert {
  text-align: left;
  direction: ltr;
}

/* Custom Alert Info Styling */
.alert-info {
  background-color: #e7f3f5;
  border-color: #b8dfe4;
  color: #0c5460;
}

.alert-info .text-info {
  color: #17a2b8 !important;
}

/* LTR Badges */
.badge {
  direction: ltr;
}

/* LTR Lists */
.list-group {
  direction: ltr;
  text-align: left;
}

.list-group-item {
  text-align: left;
}

/* LTR Pagination */
.pagination {
  direction: ltr;
}

/* LTR Breadcrumbs */
.breadcrumb {
  direction: ltr;
  text-align: left;
}

/* LTR Tabs */
.nav-tabs {
  direction: ltr;
}

.nav-tabs .nav-link {
  text-align: left;
}

/* LTR Accordion */
.accordion {
  direction: ltr;
  text-align: left;
}

.accordion-header {
  text-align: left;
}

.accordion-body {
  text-align: left;
}

/* LTR Carousel */
.carousel {
  direction: ltr;
}

/* LTR Offcanvas */
.offcanvas {
  direction: ltr;
  text-align: left;
}

.offcanvas-header {
  text-align: left;
}

.offcanvas-body {
  text-align: left;
}

/* LTR Toast */
.toast {
  direction: ltr;
  text-align: left;
}

/* Custom LTR Utilities */
.text-start {
  text-align: left !important;
}

.text-end {
  text-align: right !important;
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Custom animations for LTR */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

/* LTR-specific animations */
.ltr-slide-in {
  animation: slideInLeft 0.3s ease-out;
}

.ltr-slide-out {
  animation: slideOutLeft 0.3s ease-out;
}

/* Responsive design enhancements */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group .btn {
    border-radius: 0.375rem !important;
    margin-bottom: 0.25rem;
  }
}

/* Print styles for LTR */
@media print {
  body {
    direction: ltr;
    text-align: left;
  }
  
  .navbar, .btn, .card-footer {
    display: none !important;
  }
}

/* Custom Color Applications - Moved to bootstrap-custom.css */

/* Custom Components */
.chat-container {
  background-color: var(--accent-color);
  border: 1px solid var(--primary-color);
}

.stage-indicator {
  background-color: var(--secondary-color);
  color: white;
}

.completion-badge {
  background-color: var(--success-color);
  color: white;
}

/* Custom Download Icon Button Styling */
.btn-download-icon {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border: 2px solid var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem;
  border-radius: 50%;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 103, 112, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-download-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-download-icon:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  border-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 103, 112, 0.3);
  text-decoration: none;
}

.btn-download-icon:hover::before {
  left: 100%;
}

.btn-download-icon:active {
  transform: translateY(0) scale(1.05);
  box-shadow: 0 2px 6px rgba(0, 103, 112, 0.4);
}

.btn-download-icon i {
  font-size: 1rem;
}

/* Responsive download icon button */
@media (max-width: 768px) {
  .btn-download-icon {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  
  .btn-download-icon i {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .btn-download-icon {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .btn-download-icon i {
    font-size: 0.8rem;
  }
}

/* Validation Error Styling */
textarea.is-invalid {
  border-color: var(--danger-color) !important;
  border-width: 2px !important;
  background-color: #ffe6e6;
}

textarea.is-invalid:focus {
  border-color: var(--danger-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* Add animation for invalid fields */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

textarea.is-invalid {
  animation: shake 0.5s;
}