/* Custom polished styles for Announce application */

/* Page background and base text */
body {
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Keep wrapper full height */
#wrapper {
  min-height: 100vh;
}

/* Sidebar polish */
#sidebar-wrapper {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fb 100%);
  border-right: 1px solid rgba(20,30,40,0.06);
  box-shadow: 2px 0 8px rgba(13,38,76,0.02);
}

.sidebar-heading {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.9rem 1rem;
}

#site-selector {
  border-radius: 8px;
}

/* List group subtle hover and lift */
.list-group-item {
  border: none;
  transition: background .18s ease, transform .06s ease, box-shadow .12s ease;
}
.list-group-item:hover {
  background: rgba(13,110,253,0.04);
  transform: translateX(4px);
  box-shadow: 0 4px 10px rgba(8,35,102,0.04);
}

/* Navbar backdrop and shadow */
.navbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(13,38,76,0.04);
}

/* Page content card look */
#pageContent > .container-fluid.border.bg-light.p-2.w-75 {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 10px;
  box-shadow: 0 6px 30px rgba(8,35,102,0.06);
  padding: 1.6rem;
  border: 1px solid rgba(8,35,102,0.04);
}

/* Buttons: deeper, modern gradient */
.btn-primary {
  background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
  border: none;
  box-shadow: 0 6px 18px rgba(30,64,175,0.18);
  transition: transform .08s ease, box-shadow .12s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30,64,175,0.22);
}

/* Secondary subtle button */
.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid rgba(15,23,42,0.06);
}

/* Tables: soft stripes and hover lift */
.table {
  background: transparent;
  overflow: visible; /* allow dropdowns to overflow table */
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background: rgba(13,110,253,0.02);
}
.table tbody tr:hover {
  background: rgba(13,110,253,0.04);
  /* avoid transform on rows to prevent stacking-context issues with absolute dropdown menus */
  transition: background .12s ease;
  box-shadow: 0 6px 18px rgba(8,35,102,0.04);
}

/* Ensure dropdown menus float above table content */
.dropdown-menu {
  z-index: 2200 !important;
}

/* Modal elevation */
.modal-content {
  border-radius: 10px;
  box-shadow: 0 20px 55px rgba(8,35,102,0.12);
}

/* Form focus states */
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.15);
  border-color: #3b82f6;
}

/* Collapse rotate helper */
.rotate-icon {
  transition: transform .18s ease;
}
.rotate-icon.rotate {
  transform: rotate(180deg);
}

/* Images and logos */
img {
  max-width: 100%;
  height: auto;
}
.table img {
  border-radius: 6px;
  object-fit: contain;
  max-height: 60px;
}

/* Small responsive adjustments */
@media (max-width: 992px) {
  #sidebar-wrapper {
    position: relative;
  }
  #pageContent > .container-fluid.border.bg-light.p-2.w-75 {
    width: 100% !important;
    box-shadow: none;
    border-radius: 6px;
  }
}

/* --- Publication Schedule step (createObituary + Herald obit step 5) --- */
.main-container {
  max-width: 720px;
  margin: 0 auto;
}

.main-container .content-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(8, 35, 102, 0.06);
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Blue header banner (match reference: medium-dark blue, white text) */
.main-container .page-header-banner {
  background-color: #2a609d;
  color: #fff;
  padding: 1rem 2rem;
  margin: 0 0 1rem 0;
}

.main-container .page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.main-container .content-card .page-description {
  padding: 0 2rem;
}

.main-container .content-card > .alert,
.main-container .content-card > .toast,
.main-container .content-card > .publication-card,
.main-container .content-card > .cost-summary,
.main-container .content-card > form,
.main-container .content-card > .button-group {
  margin-left: 2rem;
  margin-right: 2rem;
}

.main-container .content-card > .cost-summary,
.main-container .content-card > .button-group {
  margin-bottom: 2rem;
}

.main-container .page-description {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.main-container .publication-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.main-container .publication-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.main-container .publication-card.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.main-container .publication-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.main-container .publication-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1f2937;
}

.main-container .publication-price {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1d4ed8;
}

.main-container .publication-details {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.35rem;
  margin-left: 0;
}

/* Cost Summary: light blue box with blue border (match Public flow) */
.main-container .cost-summary {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.main-container .cost-header {
  font-weight: 700;
  font-size: 1rem;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.main-container .cost-summary .cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: #374151;
  padding: 0.25rem 0;
}

.main-container .cost-summary .cost-row.cost-total {
  font-weight: 700;
  border-top: 1px solid #bfdbfe;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

/* Line items inside cost summary (bundles, single days, online only) */
.main-container .cost-summary-line-items {
  margin-bottom: 0.75rem;
  min-height: 2rem;
}

.main-container .cost-summary-line-items .bundle-item {
  border-bottom: 1px solid #bfdbfe;
}

.main-container .cost-summary-line-items .bundle-item:last-child {
  border-bottom: none;
}

.main-container .cost-summary-empty {
  text-align: center;
  color: #6b7280;
  padding: 0.75rem 0;
  font-size: 0.9rem;
}

/* Save button row (match other obit forms) */
.main-container .cost-summary-actions {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.main-container .cost-summary-actions .float-end {
  float: right;
}

/* Publication schedule: form groups and labels */
.main-container .form-group {
  margin-bottom: 1rem;
}

.main-container .form-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.main-container .form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  color: #111827;
  background: #fff;
}

.main-container .form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Info boxes */
.main-container .info-box {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid #6b7280;
  background: #f9fafb;
  font-size: 0.9rem;
  color: #374151;
}

.main-container .info-box-blue {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1e40af;
}

.main-container .info-box-warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

.main-container .info-box-green {
  background: #ecfdf5;
  border-left-color: #10b981;
  color: #065f46;
}

/* Date picker header and nav */
.main-container .date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.main-container .date-picker-title {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
}

.main-container .date-jump-input {
  display: none;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
}

.main-container .date-jump-input.visible {
  display: block !important;
}

.main-container .nav-buttons {
  display: flex;
  gap: 0.5rem;
}

.main-container .nav-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
}

.main-container .nav-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.main-container .nav-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.main-container .nav-btn:last-child {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}

.main-container .nav-btn:last-child:hover:not(:disabled) {
  background: #374151;
}

/* Date picker grid */
.main-container .date-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.main-container .date-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}

.main-container .date-cell:hover:not(.disabled) {
  background: #f9fafb;
  border-color: #93c5fd;
}

.main-container .date-cell.pending {
  background: #fef3c7;
  border-color: #f59e0b;
}

.main-container .date-cell.selected {
  background: #dbeafe;
  border-color: #2563eb;
}

.main-container .date-cell.selected-single {
  background: #d1fae5;
  border-color: #10b981;
}

.main-container .date-cell.disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.main-container .date-cell .date-day {
  font-weight: 600;
  min-width: 2.5rem;
}

.main-container .date-cell .date-date {
  color: #6b7280;
}

.main-container .date-cell .date-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1d4ed8;
}

/* Action buttons: Add 4-Day Bundle (blue), Add Single Day (green), Clear (gray) */
.main-container .action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.main-container .btn-add {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
}

.main-container .btn-add:hover {
  background: #1d4ed8;
}

.main-container .btn-add-single {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  background: #16a34a;
  color: #fff;
}

.main-container .btn-add-single:hover {
  background: #15803d;
}

/* Bundle list */
.main-container .bundle-list {
  margin-bottom: 1rem;
  min-height: 2rem;
}

.main-container .bundle-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.main-container .bundle-item:last-child {
  border-bottom: none;
}

.main-container .bundle-info {
  width: 100%;
}

.main-container .bundle-item-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.main-container .bundle-info .bundle-title {
  font-weight: 600;
  color: #1f2937;
}

.main-container .bundle-info .bundle-dates {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  padding-left: 0;
}

.main-container .bundle-item-header .bundle-price {
  margin-left: auto;
  font-weight: 600;
  color: #1d4ed8;
}

.main-container .bundle-price {
  font-weight: 600;
  color: #1d4ed8;
}

.main-container .btn-remove-bundle {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
}

.main-container .btn-remove-bundle:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

/* Selection summary (Total Days, Subtotal) */
.main-container .selection-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0.75rem 0;
  font-size: 0.95rem;
}

.main-container .publication-options {
  margin-top: 0.75rem;
}
