/* Pricing Cards Styles */
.pricing-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 400ms ease;
    border: 1px solid #e1e5e9;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.pricing-header {
    padding: 32px 24px 24px;
    text-align: center;
}

.pricing-header h3 {
    font-family: 'Inter';
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.pricing-header .subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.4;
}

.pricing-header .price {
    margin-bottom: 0;
}

.pricing-header .price .currency {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    vertical-align: top;
}

.pricing-header .price .amount {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.pricing-header .price .period {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.pricing-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0 24px;
}

.pricing-features {
    padding: 24px;
}

.pricing-features h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 14px;
    color: #4b5563;
    position: relative;
    padding-left: 24px;
}

.pricing-features li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #6366f1;
    position: absolute;
    left: 0;
    top: 6px;
    font-size: 12px;
}

.pricing-footer {
    padding: 0 24px 24px;
    text-align: center;
}

.pricing-footer .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    display: block;
    width: 100%;
    margin-bottom: 12px;
    transition: all 300ms ease;
}

.pricing-footer .btn-primary:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.see-all-features {
    font-size: 14px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 300ms ease;
}

.see-all-features:hover {
    color: #5b21b6;
}

.see-all-features i {
    margin-left: 4px;
    font-size: 12px;
}

/* Billing Toggle Styles */
.billing-toggle-wrapper {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.billing-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #f9fafb;
    padding: 8px 16px;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.toggle-label.active {
    color: #6366f1;
    font-weight: 600;
}

.save-badge {
    background-color: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #6366f1;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.page-header {
    background-color: #f9fafb;
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.page-header h1 {
    margin-bottom: 16px;
    color: #1f2937;
}

.page-header p {
    font-size: 16px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Responsive adjustments for pricing cards */
@media (max-width: 991px) {
    .pricing-card {
        margin-bottom: 24px;
    }
    
    .pricing-header {
        padding: 24px 20px 20px;
    }
    
    .pricing-features {
        padding: 20px;
    }
    
    .pricing-footer {
        padding: 0 20px 20px;
    }
    
    .pricing-header h3 {
        font-size: 18px;
    }
    
    .pricing-header .price .amount {
        font-size: 32px;
    }
    
    .billing-toggle {
        gap: 12px;
        padding: 6px 12px;
    }
    
    .toggle-label {
        font-size: 13px;
    }
    
    .tenant-selection {
        max-width: 350px;
    }
    
    .tenant-label {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .pricing-card {
        margin-bottom: 20px;
    }
    
    .page-header {
        padding: 60px 0 40px;
    }
    
    .billing-toggle {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .save-badge {
        margin-left: 0;
        margin-top: 4px;
    }
    
    .tenant-selection {
        max-width: 300px;
    }
    
    .tenant-select {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .no-tenant-message {
        padding: 40px 20px;
    }
    
    .no-tenant-message h3 {
        font-size: 20px;
    }
    
    .no-tenant-message p {
        font-size: 14px;
    }
}

/* Tenant Selection Styles */
.tenant-selection-wrapper {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.tenant-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    width: 100%;
}

.tenant-label {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.tenant-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    background-color: #ffffff;
    transition: all 300ms ease;
    cursor: pointer;
}

.tenant-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tenant-select:hover {
    border-color: #d1d5db;
}

/* Loading and State Styles */
#pricingLoading {
    padding: 60px 20px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.no-tenant-message {
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.no-tenant-message h3 {
    font-size: 24px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.no-tenant-message p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
}

.no-tenant-message i {
    color: #9ca3af;
}

/* Billing Toggle Styles */

/* Billing Toggle Bar (centered capsule) */
.billing-toggle-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background-color: #f9fafb;
    margin: 24px auto 0;
    max-width: 1480px;
}

/* Existing toggle aligns inside bar */
.billing-toggle-wrapper { margin-top: 24px; }
.billing-toggle { margin: 0; background: transparent; border: 0; padding: 0; }

/* Fine tune labels inside bar for visual balance */
.billing-toggle .toggle-label:first-child { color: #6366f1; font-weight: 600; }
.billing-toggle .toggle-label + .switch { margin: 0 12px; }

/* Responsive: keep centered and full width padding reduced */
@media (max-width: 991px) {
  .billing-toggle-bar { max-width: 100%; padding: 12px 14px; }
}
@media (max-width: 576px) {
  .billing-toggle-bar { padding: 10px 12px; }
}

/* Segmented billing control */
.billing-segmented {
  display: inline-flex;
  background: #eceff3;
  padding: 6px;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}
.segmented-option {
  position: relative;
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all .2s ease;
}
.segmented-option.active {
  background: #3f3696;
  color: #fff;
  box-shadow: 0 4px 10px rgba(63,54,150,.28);
}
.segmented-option .segmented-discount {
  background: #d1fae5;
  color: #065f46;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 6px;
  font-weight: 700;
}



@media (max-width: 576px) {
  .billing-segmented { width: 100%; justify-content: space-between; }
}

/* Selected card highlight */
.pricing-card.is-selected {
  border-color: #3f3696;
  box-shadow: 0 10px 24px rgba(63,54,150,.18);
}
.pricing-card.is-selected .btn-primary {
  transform: translateY(-1px);
}

/* Layout refinements */
.pricing-card .pricing-header { padding-top: 28px; }
.pricing-card .pricing-features { padding-top: 18px; }
.pricing-card .pricing-footer { padding-bottom: 22px; }

/* Pricing page spacing refinements */
.pricing-page .page-header { padding: 48px 0 28px; }
.pricing-page .tenant-selection-wrapper { margin-top: 16px; }
.pricing-page .billing-toggle-wrapper { margin-top: 12px; }
.pricing-page .space-100 { padding-top: 36px; padding-bottom: 36px; }

/* Segmented toggle usability */
.billing-segmented { gap: 6px; }
.segmented-option { min-width: 110px; text-align: center; }
.segmented-option:focus-visible { outline: 2px solid #3f3696; outline-offset: 2px; }

@media (max-width: 991px) {
  .pricing-page .page-header { padding: 36px 0 20px; }
  .pricing-page .space-100 { padding-top: 28px; padding-bottom: 28px; }
  .segmented-option { min-width: 96px; }
}

/* Controls row: select + toggle on one line */
.pricing-controls { 
  display: flex; 
  align-items: flex-end; 
  justify-content: space-between; 
  gap: 16px; 
  margin-top: 16px; 
}
.pricing-controls .tenant-selection { flex: 1; max-width: 520px; }
.pricing-controls .tenant-label { display: block; margin-bottom: 6px; }
.pricing-controls .billing-toggle-wrapper { flex-shrink: 0; }
.pricing-controls .billing-toggle-bar { margin: 0; }

@media (max-width: 991px) {
  .pricing-controls { flex-direction: column; align-items: stretch; }
  .pricing-controls .billing-toggle-wrapper { display: flex !important; justify-content: center; }
}

/* Hide provider select (UI only) and center toggle */
.pricing-page .pricing-controls { justify-content: center; }
.pricing-page .pricing-controls .tenant-selection { display: none; }
.pricing-page .pricing-controls .billing-toggle-wrapper { display: flex !important; justify-content: center; }

/* Ensure Sign Up stays at the bottom of each pricing card */
.pricing-card { display: flex; flex-direction: column; height: 100%; }
.pricing-card .pricing-footer { margin-top: auto; }

/* Theme color overrides (applied site-wide for pricing components) */
:root { --theme-primary: #55bebe; }

/* Sign Up button themed + shadow */
.pricing-footer .btn-primary {
  background: var(--theme-primary) !important;
  box-shadow: 0 8px 18px rgba(85, 190, 190, 0.35) !important;
}
.pricing-footer .btn-primary:hover {
  filter: brightness(0.92);
  box-shadow: 0 10px 22px rgba(85, 190, 190, 0.45) !important;
}

/* Highlighted card use theme */
.pricing-card.is-selected { border-color: var(--theme-primary) !important; box-shadow: 0 10px 24px rgba(85,190,190,.28) !important; }

/* Toggle accents themed */
.billing-toggle .toggle-label:first-child { color: var(--theme-primary) !important; }
.segmented-option.active { background: var(--theme-primary) !important; box-shadow: 0 4px 10px rgba(85,190,190,.28) !important; }
input:checked + .slider { background-color: var(--theme-primary) !important; }
.segmented-option:focus-visible { outline: 2px solid var(--theme-primary) !important; }