/* Dark Mode Borders and Separators - Comprehensive Styling */

/* Dark mode carousel controls - make arrows visible */
html[data-theme="dark"] .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23fff' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e") !important;
}

html[data-theme="dark"] .carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23fff' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

html[data-theme="dark"] .carousel-control-prev,
html[data-theme="dark"] .carousel-control-next {
  opacity: 1 !important;
}

/* Dark mode borders - enhance visibility */
html[data-theme="dark"] .border {
  border-color: #555 !important;
}

html[data-theme="dark"] .border-top {
  border-top-color: #555 !important;
}

html[data-theme="dark"] .border-bottom {
  border-bottom-color: #555 !important;
}

html[data-theme="dark"] .border-left {
  border-left-color: #555 !important;
}

html[data-theme="dark"] .border-right {
  border-right-color: #555 !important;
}

html[data-theme="dark"] .border-light {
  border-color: #555 !important;
}

html[data-theme="dark"] .row.border-top {
  border-top: 1px solid #555 !important;
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  border-color: #555 !important;
}

/* Dark mode text colors */
html[data-theme="dark"] .text-dark {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .text-muted {
  color: #999 !important;
}

/* Dark mode for main sections - add visible borders */
html[data-theme="dark"] .container-fluid {
  border-color: #555 !important;
}

html[data-theme="dark"] .container-fluid.mb-5 {
  border-bottom: 1px solid #555 !important;
}

html[data-theme="dark"] .container-fluid.bg-secondary {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-top: 1px solid #555 !important;
  border-bottom: 1px solid #555 !important;
}

html[data-theme="dark"] .row.bg-secondary {
  background-color: #2a2a2a !important;
  border-bottom: 1px solid #555 !important;
}

html[data-theme="dark"] .container-fluid.bg-secondary h1,
html[data-theme="dark"] .container-fluid.bg-secondary h5,
html[data-theme="dark"] .container-fluid.bg-secondary p {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .container-fluid.bg-secondary a {
  color: #7B3FF2 !important;
}

html[data-theme="dark"] .container-fluid.bg-secondary a:hover {
  color: #9d5dff !important;
}

/* Dark mode navbar styling */
html[data-theme="dark"] .navbar-light {
  background-color: #1C1C1C !important;
}

html[data-theme="dark"] .navbar-toggler {
  border-color: #7B3FF2 !important;
}

html[data-theme="dark"] .navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(123, 63, 242, 0.25) !important;
}

html[data-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%237B3FF2' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

html[data-theme="dark"] .navbar-collapse {
  background-color: #1C1C1C !important;
  border-top-color: #555 !important;
}

html[data-theme="dark"] .nav-link {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active {
  color: #7B3FF2 !important;
}

html[data-theme="dark"] .navbar-vertical {
  background-color: #2a2a2a !important;
  border-color: #555 !important;
  width: calc(100% - 30px) !important;
  z-index: 1 !important;
}

html[data-theme="dark"] .navbar-vertical .nav-link {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .navbar-vertical .nav-link:hover {
  color: #7B3FF2 !important;
}

html[data-theme="dark"] .navbar-vertical p {
  color: #b0b0b0 !important;
}

html[data-theme="dark"] .navbar-vertical .text-muted {
  color: #999 !important;
}

html[data-theme="dark"] .bg-light {
  background-color: #2a2a2a !important;
}

/* Dark mode Information button */
html[data-theme="dark"] .col-lg-3 .btn.bg-primary {
  background-color: #7B3FF2 !important;
  border-color: #7B3FF2 !important;
  color: #fff !important;
}

html[data-theme="dark"] .col-lg-3 .btn.bg-primary:hover {
  background-color: #9d5dff !important;
  border-color: #9d5dff !important;
  color: #fff !important;
}

html[data-theme="dark"] .col-lg-3 .btn.bg-primary .fa-angle-down {
  color: #e0e0e0 !important;
}

/* Dark mode for checkout and cards */
html[data-theme="dark"] .card {
  background-color: #1C1C1C !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

html[data-theme="dark"] .card-body {
  background-color: #1C1C1C !important;
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .card-body h5 {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .card-body h6 {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .product-row {
  background-color: #2a2a2a !important;
  border-color: #555 !important;
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .product-row h6 {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .product-row .product-name {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .product-row .product-meta span {
  color: #b0b0b0 !important;
}

html[data-theme="dark"] .product-row .text-muted {
  color: #999 !important;
}

html[data-theme="dark"] .product-row .font-weight-medium {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .product-row .font-weight-bold {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] hr {
  border-color: #555 !important;
}

/* Override inline RGB colors to dark mode */
html[data-theme="dark"] [style*="color: rgb(44, 62, 80)"] {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] [style*="border-top: 1px solid rgb(238, 238, 238)"] {
  border-top-color: #555 !important;
}

html[data-theme="dark"] .form-control {
  background-color: #1a1a1a !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

html[data-theme="dark"] .form-control:focus {
  background-color: #1a1a1a !important;
  color: #e0e0e0 !important;
  border-color: #7B3FF2 !important;
}

/* Dark mode for alerts and notifications */
html[data-theme="dark"] .alert {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

html[data-theme="dark"] .alert-success {
  background-color: #1a3a2a !important;
  border-color: #2d5a3d !important;
  color: #7fe0a0 !important;
}

html[data-theme="dark"] .alert-success .alert-link {
  color: #9dffb8 !important;
}

html[data-theme="dark"] .alert-danger {
  background-color: #3a1a1a !important;
  border-color: #5a2d2d !important;
  color: #ff8080 !important;
}

html[data-theme="dark"] .alert-info {
  background-color: #1a2a3a !important;
  border-color: #2d3d5a !important;
  color: #7dbfe0 !important;
}

html[data-theme="dark"] .alert-warning {
  background-color: #3a3a1a !important;
  border-color: #5a5a2d !important;
  color: #ffe0a0 !important;
}

/* Dark mode for custom radio buttons and checkboxes */
html[data-theme="dark"] .custom-control-input {
  background-color: transparent;
  border: 2px solid #555 !important;
}

html[data-theme="dark"] .custom-control-input:focus {
  border-color: #7B3FF2 !important;
  box-shadow: 0 0 0 0.2rem rgba(123, 63, 242, 0.25) !important;
}

html[data-theme="dark"] .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #7B3FF2 !important;
  border-color: #7B3FF2 !important;
}

html[data-theme="dark"] .custom-control-input:checked:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 0.2rem rgba(123, 63, 242, 0.25) !important;
}

html[data-theme="dark"] .custom-control-input:disabled ~ .custom-control-label {
  color: #666 !important;
}

html[data-theme="dark"] .custom-control-label::before {
  background-color: transparent;
  border: 2px solid #555 !important;
}

html[data-theme="dark"] .custom-control-label::after {
  background-image: none;
}

html[data-theme="dark"] .custom-radio .custom-control-label::before {
  border-radius: 50%;
}

/* Dark mode for radio/checkbox label styling */
html[data-theme="dark"] .custom-control-label {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .custom-control-input:hover ~ .custom-control-label::before {
  background-color: #333 !important;
  border-color: #7B3FF2 !important;
}

/* Fix color label buttons in dark mode - prevent pink/beige hover */
html[data-theme="dark"] .color-label {
  transition: all 0.3s ease !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .color-label:hover {
  filter: brightness(1.2) !important;
  box-shadow: 0 0 8px rgba(123, 63, 242, 0.3) !important;
}

html[data-theme="dark"] .color-label:active,
html[data-theme="dark"] .color-label:focus {
  box-shadow: 0 0 12px rgba(123, 63, 242, 0.5) !important;
}

/* Dark mode buttons - ensure proper hover colors */
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus,
html[data-theme="dark"] .btn-primary:active {
  background-color: #9d5dff !important;
  border-color: #9d5dff !important;
  color: #fff !important;
}

/* Dark mode outline buttons */
html[data-theme="dark"] .btn-outline-secondary {
  color: #7B3FF2 !important;
  border-color: #7B3FF2 !important;
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus,
html[data-theme="dark"] .btn-outline-secondary:active {
  background-color: #7B3FF2 !important;
  border-color: #7B3FF2 !important;
  color: #fff !important;
}

/* Ensure dark mode buttons don't turn pink/beige */
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-outline-secondary):not(.btn-link):not(.btn-dark):not(.back-to-top) {
  background-color: #333 !important;
  border-color: #555 !important;
  color: #e0e0e0 !important;
}

html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-outline-secondary):not(.btn-link):not(.btn-dark):not(.back-to-top):hover {
  background-color: #444 !important;
  border-color: #666 !important;
  color: #fff !important;
}

/* Back to top button styling */
html[data-theme="dark"] .back-to-top {
  background-color: #7B3FF2 !important;
  border-color: #7B3FF2 !important;
  color: #fff !important;
}

html[data-theme="dark"] .back-to-top:hover {
  background-color: #9d5dff !important;
  border-color: #9d5dff !important;
  color: #fff !important;
}

html[data-theme="dark"] .back-to-top i {
  color: #fff !important;
}

/* Dark mode custom text preview box */
html[data-theme="dark"] #custom-text-preview {
  background-color: #2a2a2a !important;
  border-color: #444 !important;
}

html[data-theme="dark"] #custom-text-preview p {
  color: #e0e0e0 !important;
}

html[data-theme="dark"] #preview-text {
  color: #b0b0b0 !important;
}

/* Dark mode color selector labels */
html[data-theme="dark"] .custom-control-label {
  color: #e0e0e0 !important;
}

/* Fix white color labels in dark mode */
html[data-theme="dark"] .custom-control-label[style*="background-color: #fff"],
html[data-theme="dark"] .custom-control-label[style*="background-color: #ffffff"],
html[data-theme="dark"] .custom-control-label[style*="background-color: #FFF8DC"],
html[data-theme="dark"] .custom-control-label[style*="background-color: #ADD8E6"],
html[data-theme="dark"] .custom-control-label[style*="background-color: #FFFACD"] {
  filter: brightness(0.8) !important;
  border: 1px solid #666 !important;
}

/* Fix gradient color labels in dark mode */
html[data-theme="dark"] .custom-control-label[style*="linear-gradient"] {
  filter: brightness(1.2) saturate(1.1) !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

