:root {
  /* Custom Color Variables */
  /*--primary-color: #3b82f6;*/
  --primary-color: #1e293b;
  --secondary-color: #64748b;
  --accent-color: #8b5cf6;
  --light-color: #f8fafc;
  --dark-color: #0f172a;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --card-bg: #ffffff;
  --navbar-bg: #cccccc;
  --footer-bg: #000000;
  --modal-header-bg: #1e293b;
}

/* Bootstrap Utility Overrides */
.bg-primary {
  background-color: var(--navbar-bg) !important;
}

.bg-dark {
  background-color: var(--footer-bg) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-white {
  color: white !important;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-check {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  background-color: var(--card-bg) !important; /* custom kd */
}

/* Custom - KD */
.navbar .navbar-nav .nav-link {
  color: var(--primary-color) !important;
}

.navbar-toggler {
  border-color: var(--primary-color) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='black' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}


/*.btn-primary:hover,*/
/*.btn-outline-primary:hover {*/
/*  background-color: #2563eb !important;*/
/*  border-color: #2563eb !important;*/
/*  color: white !important;*/
/*}*/

.btn-primary:hover,
.btn-outline-primary:hover {
  background-color: #cccccc !important;
  border-color: #cccccc !important;
  color: #1e293b !important;
}

/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f1f5f9;
  color: #334155;
}

/* Navbar */
.navbar {
  background-color: var(--navbar-bg) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: black !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}

.nav-link:hover {
  color: white !important;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-header {
  background-color: var(--light-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 500;
  color: var(--dark-color);
}

/* Buttons */
.btn-custom-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-custom-primary:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.btn-outline-success {
  color: var(--success-color) !important;
  border-color: var(--success-color) !important;
}

.btn-outline-success:hover {
  background-color: var(--success-color) !important;
  border-color: var(--success-color) !important;
  color: white !important;
}

.btn-outline-danger {
  color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
}

.btn-outline-danger:hover {
  background-color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
  color: white !important;
}

/* Report Button */
.report-btn {
  padding: 0.15rem 0.3rem;
  font-size: 0.75rem;
}

/* Poll Options */
.poll-options .form-check-label {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* Comments */
.comment {
  padding: 0.75rem;
  background-color: white;
  border-radius: 5px;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--primary-color);
}

.comment p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  background-color: var(--footer-bg) !important;
  color: white !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer a {
  color: #cbd5e1 !important;
  text-decoration: none;
}

footer a:hover {
  color: white !important;
  text-decoration: underline;
}

/* Modals */
.modal-content {
  border-radius: 10px;
}

.modal-header {
  background-color: var(--modal-header-bg) !important;
  color: white !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.modal-header .btn-close {
  filter: invert(1);
}

/* Text preview and toggle styles */
.confession-text {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: #334155;
}

.text-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toggle-details-btn {
  background: none;
  border: none;
  color: var(--primary-color) !important;
  padding: 0;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
}

.toggle-details-btn:hover {
  text-decoration: underline;
}

.toggle-details-btn i {
  margin-left: 0.3rem;
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.toggle-details-btn[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.detail-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  margin-left: 2rem;
  border-left: 3px solid var(--light-color);
  padding-left: 1rem;
}

.detail-section.expanded {
  max-height: 5000px;
}

.reply-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.reply-textarea {
  min-height: 80px;
  resize: vertical;
  padding: 0.25rem;
  transition: all 0.2s ease;
}

.reply-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.reply-submit-btn {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  transition: background-color 0.2s ease;
  color: white !important;
}

.reply-submit-btn:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.reply-submit-btn:active,
.reply-submit-btn:focus {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.5);
}

.reply-submit-btn:disabled {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  opacity: 0.7;
}

/* Home Page Specific Styles */
.home-hero .display-5 {
  color: var(--dark-color) !important;
}

.home-feature-card .card-title {
  color: var(--primary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .home-hero .display-5 {
    font-size: 2rem;
  }
}
