:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Main Container Styles */
.setup-wizard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Header Styles */
.setup-wizard-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-color);
}

.logo-container {
    margin-right: 1.5rem;
}

.logo {
    max-height: 60px;
}

.setup-wizard-header h1 {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1.8rem;
}

/* Progress Bar Styles */
.progress-container {
    margin-bottom: 2rem;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress {
    height: 0.8rem;
    border-radius: 1rem;
    background-color: var(--light-color);
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 1rem;
    transition: width 0.3s ease;
}

/* Content Styles */
.setup-wizard-content {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-header h2 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.section-header .lead {
    color: #7f8c8d;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.card-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Navigation Buttons Styles */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.navigation-buttons .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.navigation-buttons .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.navigation-buttons .btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.navigation-buttons .btn-secondary {
    background-color: #95a5a6;
    border-color: #95a5a6;
}

.navigation-buttons .btn-secondary:hover {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
}

/* Setup Options Styles */
.setup-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.setup-option {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.setup-option:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.form-check-input:checked + .form-check-label .setup-option {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.form-check-label {
    display: flex;
    cursor: pointer;
    width: 100%;
}

.option-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.option-content {
    flex: 1;
}

.option-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.option-content p {
    margin: 0;
    color: #7f8c8d;
}

/* System Requirements Styles */
.system-requirements {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.requirements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.requirement {
    display: flex;
    align-items: center;
}

.requirement i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Footer Styles */
.setup-wizard-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-color);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    border-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .setup-wizard-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .setup-wizard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .requirements-list {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navigation-buttons .btn {
        width: 100%;
    }
}

/* Animation Styles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.setup-wizard-content {
    animation: fadeIn 0.5s ease-out;
}

/* Database Schema Creation Styles */
.schema-progress {
    margin: 2rem 0;
}

.status-message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
}

.status-message.success {
    border-left-color: var(--success-color);
    background-color: rgba(46, 204, 113, 0.1);
}

.status-message.warning {
    border-left-color: var(--warning-color);
    background-color: rgba(243, 156, 18, 0.1);
}

.status-message.error {
    border-left-color: var(--danger-color);
    background-color: rgba(231, 76, 60, 0.1);
}

/* Module Configuration Styles */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.module-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.module-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.module-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.module-title {
    margin: 0;
    font-size: 1.1rem;
}

.module-description {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.module-switch {
    margin-top: auto;
}

/* Review Page Styles */
.review-section {
    margin-bottom: 2rem;
}

.review-item {
    display: flex;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.review-label {
    font-weight: 500;
    width: 200px;
    flex-shrink: 0;
}

.review-value {
    flex: 1;
}

/* Guidance Page Styles */
.guidance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.guidance-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.guidance-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.guidance-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.guidance-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    text-align: center;
}

.guidance-description {
    color: #7f8c8d;
}

.guidance-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.guidance-link:hover {
    text-decoration: underline;
}

/* Subscription Payment Styles */
.quote-card .billing-cycle .form-select {
  min-width: 140px;
}

.quote-card .quote-line-items {
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  background-color: #fff;
}

.quote-card .line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px dashed #eee;
}

.quote-card .line-item:last-child {
  border-bottom: none;
}

.quote-card .line-item .name {
  color: var(--secondary-color);
}

.quote-card .line-item .price {
  font-weight: 600;
}

.quote-card .quote-totals .subtotal,
.quote-card .quote-totals .tax,
.quote-card .quote-totals .total {
  padding: 0.5rem 0;
}

.quote-card .quote-totals .total {
  font-size: 1.1rem;
  border-top: 1px solid #eee;
  margin-top: 0.5rem;
}

.loading {
  color: #7f8c8d;
}

.error {
  color: var(--danger-color);
}

.warning {
  color: var(--warning-color);
}

.payment-card .card-element-wrapper {
  border: 1px dashed #ced4da;
  border-radius: var(--border-radius);
  padding: 0.75rem;
  background: #fcfcfc;
}

.payment-card .card-element {
  min-height: 40px;
}

.status-card .status-json {
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  padding: 1rem;
  overflow-x: auto;
}

.hidden {
  display: none !important;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 1rem;
}

/* Wizard action bar enhancements */
.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 1rem;
}
.wizard-actions .btn { min-height: 40px; }
.wizard-actions .btn-next { min-width: 160px; }
.wizard-actions .dropdown-toggle { min-width: 160px; }
.wizard-actions .actions-left .btn, .wizard-actions .actions-right .btn { padding-left: 1rem; padding-right: 1rem; }
.wizard-actions .wizard-note { margin-top: 0.25rem; }
.wizard-actions .trial-group { display: flex; flex-direction: column; align-items: flex-start; }
.wizard-actions .trial-group .wizard-note { margin-top: 0.25rem; max-width: 380px; }

@media (max-width: 768px) {
  .wizard-actions { gap: 12px; }
  .wizard-actions .actions-left, .wizard-actions .actions-right { width: 100%; justify-content: space-between; }
  .wizard-actions .actions-right { order: 3; }
  .wizard-actions .wizard-note { order: 4; }
  .wizard-actions .trial-group { width: 100%; }
  .wizard-actions .trial-group .dropdown-toggle { width: 100%; }
  .wizard-actions .trial-group .wizard-note { max-width: none; }
}

/* Subscription Payment Button States */
#start-subscription {
  position: relative;
  transition: all 0.3s ease;
}

#start-subscription:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}

#start-subscription:disabled:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  transform: none;
}

#start-subscription.processing {
  background-color: var(--warning-color) !important;
  border-color: var(--warning-color) !important;
}

#start-subscription.processing::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

#start-subscription.completed {
  background-color: var(--success-color) !important;
  border-color: var(--success-color) !important;
}

#start-subscription.failed {
  background-color: var(--danger-color) !important;
  border-color: var(--danger-color) !important;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Payment Method Validation Feedback */
.payment-section .form-control.is-valid {
  border-color: var(--success-color);
  box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
}

.payment-section .form-control.is-invalid {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

/* Error message styling */
.error {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.error:not(:empty) {
  display: block;
}

/* Payment provider section transitions */
.payment-section {
  transition: opacity 0.3s ease;
}

.payment-section.d-none {
  opacity: 0;
}

/* Quote loading state */
.quote-loading {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

/* Status section styling */
.status-card {
  border-left: 4px solid var(--primary-color);
}

.status-card.processing {
  border-left-color: var(--warning-color);
}

.status-card.completed {
  border-left-color: var(--success-color);
}

.status-card.failed {
  border-left-color: var(--danger-color);
}
/* Hover-reveal scrollbar utility (hidden by default, visible on hover) */
.scrollbar-hover-reveal {
  /* Firefox */
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
}
.scrollbar-hover-reveal:hover {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.06);
}
.scrollbar-hover-reveal::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}
.scrollbar-hover-reveal:hover::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scrollbar-hover-reveal::-webkit-scrollbar-track {
  background: transparent;
}
.scrollbar-hover-reveal:hover::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}
.scrollbar-hover-reveal::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.scrollbar-hover-reveal:hover::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.18);
}

/* Apply hover-reveal behavior to wizard content containers */
.setup-wizard-content {
  /* keep existing layout, but use hover-reveal scrollbars */
  scrollbar-width: none; /* Firefox */
  scrollbar-color: transparent transparent;
}
.setup-wizard-content:hover {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.06);
}
.setup-wizard-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.setup-wizard-content:hover::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.setup-wizard-content::-webkit-scrollbar-track {
  background: transparent;
}
.setup-wizard-content:hover::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}
.setup-wizard-content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.setup-wizard-content:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
}
