/* Pricing Page Styles */

.pricing-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    color: #000;
}

.pricing-header {
    text-align: center;
    margin-bottom: 48px;
}

.pricing-title-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pricing-title-icon {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
    flex: 0 0 auto;
    object-fit: contain;
}

.pricing-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.pricing-messages {
    list-style: none;
    margin: 12px auto 0;
    padding: 0;
    max-width: 640px;
}

.pricing-message-error {
    color: #b42318;
    font-size: 0.95rem;
}

.pricing-credit-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 8px auto 0;
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.pricing-credit-label {
    justify-self: end;
    text-align: right;
}

.pricing-credit-meter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pricing-credit-row .plan-odo {
    font-size: 2.16rem;
    padding: 10px 24px 12px;
    gap: 4px;
}

.pricing-credit-infinity {
    font-size: 2.16rem;
    font-weight: 700;
    line-height: 1;
}

.pricing-credit-row .plan-credit-including {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: max-content;
    white-space: nowrap;
}

.pricing-credit-row .plan-credit-part,
.pricing-credit-row .plan-credit-and {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
    white-space: nowrap;
}

.pricing-credit-row .plan-credit-ribbon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 4px;
    background: linear-gradient(180deg, #fffdf8 0%, #f4ead6 100%);
    border: 1px solid #d9cbb0;
    border-radius: 2px;
    box-shadow: 1px 1px 0 rgba(80, 60, 20, 0.16);
    transform: rotate(-1.5deg);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    color: #3a2e1e !important;
}

.pricing-credit-row .plan-credit-ribbon--tape {
    padding: 1px 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 42%, rgba(20, 50, 110, 0.08)),
        linear-gradient(180deg, #d7e6ff 0%, #9ebef0 100%);
    border: 0;
    border-radius: 1px;
    box-shadow: 0 1px 0 rgba(22, 54, 110, 0.28);
    transform: rotate(2deg);
    color: #16325c !important;
}

.pricing-pack-row-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 8px 0;
}

.pricing-pack-row-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Optical match: individual fills its square; sharable is a wide group. */
.pricing-pack-row-icon--individual {
    width: 26px;
    height: 26px;
}

.pricing-pack-row-icon--sharable {
    width: 48px;
    height: 29px;
}

.pricing-pack-row-icon--monitor {
    width: 25px;
    height: 25px;
}

.pricing-pack-row-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.pricing-pack-row-hint {
    text-align: center;
    color: #444;
    margin: 0 0 12px;
    font-size: 15px;
}

.credit-custom-amount-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.credit-custom-amount-label {
    font-weight: 600;
    font-size: 14px;
}

.credit-custom-amount-input {
    width: 7.5rem;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.credit-pack-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.credit-pack-pill-form {
    margin: 0;
    display: inline;
}

.pricing-container .credit-pack-pills--individual .dashboard-btn {
    background: #e8f2ff;
    border-color: #b6d4f5;
}

.pricing-container .credit-pack-pills--individual .dashboard-btn:hover,
.pricing-container .credit-pack-pills--individual .dashboard-btn:active,
.pricing-container .credit-pack-pills--individual .dashboard-btn:focus {
    background: #d4e7ff;
    border-color: #8fbce8;
}

.pricing-container .credit-pack-pills--sharable .dashboard-btn {
    background: #e7f7ec;
    border-color: #b7e0c4;
}

.pricing-container .credit-pack-pills--sharable .dashboard-btn:hover,
.pricing-container .credit-pack-pills--sharable .dashboard-btn:active,
.pricing-container .credit-pack-pills--sharable .dashboard-btn:focus {
    background: #d5f0dd;
    border-color: #8dcc9f;
}

.pricing-briefing-section {
    margin-bottom: 40px;
}

.pricing-briefing-section .briefing-subscribe-row {
    margin-bottom: 0;
}

.pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn) {
    background: #f0e8ff;
    border-color: #d4c4f0;
}

.pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn):hover,
.pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn):active,
.pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn):focus {
    background: #e4d6ff;
    border-color: #b9a3e3;
}

.briefing-subscribe-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.briefing-subscribe-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.briefing-subscribe-status {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.briefing-subscribe-form {
    margin: 0;
    display: inline;
}

.briefing-subscribe-action-pill {
    color: #000 !important;
    width: auto;
    min-width: 0;
    padding: 10px 20px;
    box-sizing: border-box;
}

.briefing-subscribe-action-pill:hover,
.briefing-subscribe-action-pill:active,
.briefing-subscribe-action-pill:focus {
    color: #000 !important;
}

.pricing-container .dashboard-btn {
    color: #000 !important;
    width: auto;
    min-width: 0;
}

.pricing-container .dashboard-btn:hover,
.pricing-container .dashboard-btn:active,
.pricing-container .dashboard-btn:focus {
    color: #000 !important;
}

.pricing-container .dashboard-btn:disabled {
    opacity: 0.65;
    cursor: default;
    transform: none;
}

.pricing-features-card {
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-nav-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 720px;
    margin: 14px auto 0;
}

.current-plan-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
}

/* 4-column grid for the individual tiers */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 48px;
    width: 100%;
    box-sizing: border-box;
}

.pricing-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.pricing-card.pricing-features-card {
    border: 4px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(90deg, #e11d48, #22c55e, #e11d48) border-box;
    background-size: 100% 100%, 300% 100%;
    animation: features-border 6s linear infinite;
}

.pricing-card.pricing-features-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.pricing-features-card .tier-features h3 {
    font-size: 20px;
}

.pricing-features-card .feature-name {
    font-size: 16px;
    /* Wrap between words, never inside one: the price column gives way first. */
    min-width: min-content;
    overflow-wrap: normal;
}

.pricing-features-card .feature-limit {
    font-size: 15px;
    flex-shrink: 1;
    min-width: 0;
    white-space: normal;
}

.pricing-features-card .feature-emoji {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
}

.pricing-features-card .feature-icon-img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
}

@keyframes features-border {
    from { background-position: 0 0, 0% 50%; }
    to   { background-position: 0 0, 300% 50%; }
}

.pricing-card.current-tier {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    box-shadow: 0 8px 24px rgba(102,126,234,0.2);
}

/* "Most Popular" badge */
.pricing-card.popular-card {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
}

.popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 18px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tier-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 3.2px;
    border-bottom: 2px solid #f0f0f0;
}

.tier-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tier-price {
    margin-bottom: 16px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.price-period {
    font-size: 14px;
    color: #000;
    margin-left: 4px;
}

.tier-description-wrapper {
    min-height: 96px;
    display: flex;
    align-items: flex-start;
    margin-top: 6.4px;
    margin-bottom: -24px;
}

.tier-description {
    font-size: 12px;
    color: #000;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    width: 100%;
    text-align: justify;
}

.tier-features {
    flex: 1;
    margin-bottom: 24px;
    overflow: visible;
}

.tier-features h3 {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 16px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: visible;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
    min-width: 0;
    position: relative;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item.feature-disabled {
    opacity: 0.6;
}

.feature-emoji {
    font-size: 20px;
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-img {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    flex: 0 0 auto;
    display: block;
    object-fit: contain;
}

.feature-name {
    flex: 1;
    font-size: 13px;
    color: #000;
    font-weight: 500;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.feature-limit {
    font-size: 12px;
    color: #000;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}


.unlimited-badge-inline {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.disabled-badge {
    color: #999;
    font-size: 12px;
}

.tier-actions {
    margin-top: auto;
}

/* Tier action buttons use dashboard style; full width inside card */
.tier-actions .dashboard-btn {
    width: 100%;
    margin-bottom: 12px;
}

.tier-actions .dashboard-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tier-actions .dashboard-btn:disabled:hover {
    transform: none;
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
}

/* Sign up button styling - red gradient with outline (similar to login button) */
.sign-up-btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    color: white !important;
    border-radius: 8px;
    border: 2px solid #f87171;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.sign-up-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.sign-up-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(220, 38, 38, 0.4);
    border-color: #fca5a5;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%);
    color: white !important;
    text-decoration: none !important;
}

.sign-up-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.payment-note {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

.no-tiers-message {
    text-align: center;
    padding: 48px;
    color: #000;
}

/* ------------------------------------------------------------------ */
/* Team & Enterprise section                                          */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/* Dark theme support                                                 */
/* ------------------------------------------------------------------ */

.dark-theme .pricing-card {
    background: #2a2a2a;
    border-color: #444;
}

.dark-theme .pricing-card.current-tier {
    background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.15));
}

.dark-theme .pricing-header h1,
.dark-theme .tier-name,
.dark-theme .tier-features h3,
.dark-theme .feature-name,
.dark-theme .pricing-credit-row,
.dark-theme .pricing-credit-label {
    color: #fff;
}

.dark-theme .pricing-message-error {
    color: #f87171;
}

.dark-theme .tier-description-wrapper,
.dark-theme .feature-limit,
.dark-theme .payment-note,
.dark-theme .briefing-subscribe-status,
.dark-theme .pricing-pack-row-hint {
    color: #aaa;
}

.dark-theme .pricing-pack-row-title {
    color: #fff;
}

.dark-theme .pricing-container .credit-pack-pills--individual .dashboard-btn {
    background: #1e3a5f;
    border-color: #3d6a9e;
    color: #e8f2ff !important;
}

.dark-theme .pricing-container .credit-pack-pills--individual .dashboard-btn:hover,
.dark-theme .pricing-container .credit-pack-pills--individual .dashboard-btn:active,
.dark-theme .pricing-container .credit-pack-pills--individual .dashboard-btn:focus {
    background: #274a75;
    border-color: #5a8ec4;
    color: #e8f2ff !important;
}

.dark-theme .pricing-container .credit-pack-pills--sharable .dashboard-btn {
    background: #1e3d2a;
    border-color: #3d7a52;
    color: #e7f7ec !important;
}

.dark-theme .pricing-container .credit-pack-pills--sharable .dashboard-btn:hover,
.dark-theme .pricing-container .credit-pack-pills--sharable .dashboard-btn:active,
.dark-theme .pricing-container .credit-pack-pills--sharable .dashboard-btn:focus {
    background: #275338;
    border-color: #4f9a68;
    color: #e7f7ec !important;
}

.dark-theme .pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn) {
    background: #3a2d52;
    border-color: #6b5a8a;
    color: #f0e8ff !important;
}

.dark-theme .pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn):hover,
.dark-theme .pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn):active,
.dark-theme .pricing-briefing-section .briefing-subscribe-action-pill:not(.delete-account-btn):focus {
    background: #4a3a68;
    border-color: #8a74ad;
    color: #f0e8ff !important;
}

.dark-theme .tier-description,
.dark-theme .price-period {
    color: #fff;
}


.dark-theme .tier-header {
    border-color: #444;
}

.dark-theme .feature-item {
    border-bottom-color: #444;
}

/* Dark theme pending tier notice */
.dark-theme .pending-tier-notice {
    background: linear-gradient(135deg, #5568d3 0%, #6941a0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.dark-theme .pending-tier-notice strong {
    color: white;
}

.dark-theme .payg-amount-pill {
    background: #1e3a5f;
    border-color: #5b7eb5;
    color: #d6e6ff;
    box-shadow: none;
}

.dark-theme .payg-amount-pill:hover,
.dark-theme .payg-amount-pill[aria-expanded="true"] {
    border-color: #7aa2d4;
    background: #254872;
    color: #e8f1ff;
}

.dark-theme .payg-amount-menu {
    background: #1f2937;
    border-color: #4a5568;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}

.dark-theme .payg-amount-option {
    color: #e2e8f0;
}

.dark-theme .payg-amount-option:hover,
.dark-theme .payg-amount-option:focus-visible {
    background: #374151;
    color: #c7d2fe;
}

.dark-theme .payg-amount-option[aria-selected="true"] {
    background: rgba(129, 140, 248, 0.2);
    color: #c7d2fe;
}

/* ------------------------------------------------------------------ */
/* Responsive: 4 columns on wide, 2 on medium, 1 on mobile           */
/* ------------------------------------------------------------------ */

@media (max-width: 1600px) {
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
    
    .pricing-card {
        padding: 16px;
    }
}

@media (max-width: 1400px) {
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }
    
    .pricing-card {
        padding: 14px;
    }
    
    .tier-name {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 30px;
    }
    
    .tier-description {
        font-size: 11px;
    }
    
    .tier-description-wrapper {
        min-height: 80px;
    }
    
    .feature-name {
        font-size: 12px;
    }
    
    .feature-limit {
        font-size: 11px;
    }
}

@media (max-width: 1300px) {
    .pricing-container {
        padding: 40px 15px;
    }
    
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }
    
    .pricing-card {
        padding: 12px;
    }
    
    .tier-name {
        font-size: 18px;
    }
    
    .price-amount {
        font-size: 28px;
    }
    
    .tier-description {
        font-size: 10px;
    }
    
    .tier-description-wrapper {
        min-height: 72px;
    }
    
    .tier-features h3 {
        font-size: 14px;
    }
    
    .feature-name {
        font-size: 11px;
    }
    
    .feature-limit {
        font-size: 10px;
    }
    
    .feature-emoji {
        font-size: 18px;
        width: 24px;
        min-width: 24px;
        max-width: 24px;
    }

    .feature-icon-img {
        width: 18px;
        height: 18px;
        max-width: 18px;
        max-height: 18px;
    }
}

@media (max-width: 1200px) {
    .pricing-container {
        padding: 40px 10px;
    }
    
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }
    
    .pricing-card {
        padding: 10px;
    }
    
    .tier-name {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .price-amount {
        font-size: 24px;
    }
    
    .price-period {
        font-size: 12px;
    }
    
    .tier-description {
        font-size: 9px;
        line-height: 1.3;
    }
    
    .tier-description-wrapper {
        min-height: 64px;
    }
    
    .tier-features h3 {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .feature-item {
        padding: 6px 0;
    }
    
    .feature-name {
        font-size: 10px;
    }
    
    .feature-limit {
        font-size: 9px;
    }
    
    .feature-emoji {
        font-size: 16px;
        width: 20px;
        min-width: 20px;
        max-width: 20px;
    }

    .feature-icon-img {
        width: 16px;
        height: 16px;
        max-width: 16px;
        max-height: 16px;
    }
    
    .btn-block {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .payment-note {
        font-size: 10px;
    }
}

/* Pending tier notice - matches tier badge styling */
.pending-tier-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.pending-tier-notice strong {
    font-weight: 700;
    color: white;
}

/* 2-column below 999px */
@media (max-width: 999px) {
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Stack to 1 column on mobile */
@media (max-width: 768px) {
    .pricing-container {
        max-width: 100%;
        padding: 20px 16px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pricing-header h1 {
        font-size: 32px;
    }

    .pricing-credit-row {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 10px;
    }

    .pricing-credit-label {
        justify-self: center;
        text-align: center;
    }

    .pricing-credit-row .plan-credit-including {
        justify-self: center;
        justify-content: center;
        max-width: 100%;
        overflow-x: auto;
    }

    .pricing-container .dashboard-btn {
        white-space: normal;
        text-align: center;
        max-width: 100%;
    }
    
    .price-amount {
        font-size: 36px;
    }
    
    .tier-name {
        font-size: 28px;
    }
    
    .pricing-card {
        padding: 24px;
    }
}

/* Cancellation section in pricing footer */
.cancellation-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.cancellation-section h5 {
    color: #495057;
    margin-bottom: 10px;
}

.cancellation-section p {
    color: #666;
    margin-bottom: 15px;
}

/* Unlimited badge styles */
.unlimited-badge-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    margin: 16px auto;
    max-width: 600px;
}

.unlimited-badge-gradient .badge-text {
    font-size: 1.2rem;
}

.unlimited-badge-gradient .infinity-symbol {
    font-size: 1.5rem;
}

.unlimited-badge-gradient .badge-description {
    margin: 8px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Pending tier notice with margin */
.pending-tier-notice-centered {
    margin: 16px auto;
    max-width: 800px;
}

/* Cancellation warning notice */
.pending-tier-notice-cancellation {
    background: #fff3cd;
    border-color: #ffc107;
}

.pending-tier-notice-cancellation strong {
    color: #856404;
}

.pending-tier-notice-cancellation a {
    color: #856404;
    text-decoration: underline;
}

.pricing-footer-btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    color: white !important;
    border-radius: 8px;
    border: 2px solid #a78bfa;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
    cursor: pointer;
    width: 240px;
    box-sizing: border-box;
}

.pricing-footer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.pricing-footer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(124, 58, 237, 0.4);
    border-color: #c4b5fd;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
    color: white !important;
    text-decoration: none !important;
}

.pricing-footer-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

/* Cancel subscription button - red gradient */
.pricing-footer-btn.cancel-subscription-btn {
    border: 2px solid #ef4444 !important;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%) !important;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3) !important;
}

.pricing-footer-btn.cancel-subscription-btn:hover {
    border-color: #f87171 !important;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 50%, #fca5a5 100%) !important;
    box-shadow: 0 5px 16px rgba(220, 38, 38, 0.4) !important;
}

.pricing-footer-btn.cancel-subscription-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3) !important;
}

/* ---- Plans (Nov 2026): plan columns, plan card ---- */

.credit-breakdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    vertical-align: middle;
}

.credit-breakdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.credit-breakdown-toggle img {
    width: 16px;
    height: 16px;
    display: block;
}

/* The (?) note: the app's glass note (the dictation mic's, the Paper network
   upgrade note). It lives on <body>, pinned under its button by _breakdown_help.html. */
.credit-breakdown-popover {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10070;
    width: max-content;
    min-width: 220px;
    max-width: min(340px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 16px 16px 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(241, 245, 249, 0.78));
    -webkit-backdrop-filter: blur(10px) saturate(1.6);
    backdrop-filter: blur(10px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 0 1px rgba(148, 163, 184, 0.18);
    text-align: left;
    animation: creditBreakdownIn 0.15s ease-out;
}

.credit-breakdown-popover[hidden] {
    display: none;
}

@keyframes creditBreakdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.credit-breakdown-popover .credit-breakdown-title {
    margin: 0 22px 6px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}

.credit-breakdown-popover .credit-breakdown-body {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #374151;
}

.credit-breakdown-popover .credit-breakdown-body li + li {
    margin-top: 4px;
}

.credit-breakdown-popover .credit-breakdown-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 2px 4px;
}

.credit-breakdown-popover .credit-breakdown-close:hover {
    color: #111827;
}

.dark-theme .credit-breakdown-popover {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.88));
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dark-theme .credit-breakdown-popover .credit-breakdown-title { color: #f3f4f6; }
.dark-theme .credit-breakdown-popover .credit-breakdown-body { color: #d1d5db; }
.dark-theme .credit-breakdown-popover .credit-breakdown-close { color: #9ca3af; }
.dark-theme .credit-breakdown-popover .credit-breakdown-close:hover { color: #f3f4f6; }

@media (prefers-reduced-motion: reduce) {
    .credit-breakdown-popover { animation: none; }
}

.pricing-message-info {
    color: #1e4d8c;
    font-size: 0.95rem;
}

.pricing-savings-line {
    margin: 14px auto 0;
    max-width: 640px;
    font-size: 15px;
    color: #1e4d8c;
    font-weight: 600;
}

.plan-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

@media (max-width: 960px) {
    .plan-columns {
        grid-template-columns: 1fr;
    }
}

.plan-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 24px;
    border: 2px solid transparent;
    border-radius: 16px;
    /* White card inside, moving blue → cyan → green gradient as the border. */
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(90deg, #2563eb, #06b6d4, #22c55e, #06b6d4, #2563eb) border-box;
    background-size: 100% 100%, 300% 100%;
    animation: plan-tier-border 6s linear infinite;
}

@keyframes plan-tier-border {
    from { background-position: 0 0, 0% 50%; }
    to   { background-position: 0 0, 300% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .plan-column,
    .pricing-card.pricing-features-card,
    .team-card,
    .team-invite-input { animation: none; }
    .plan-column--individual .plan-column-cta,
    .plan-column--team .plan-column-cta,
    .payg-buy-form .plan-column-cta {
        animation: none;
        background-color: #fff4ea;
    }
    .plan-current-badge {
        animation: none;
        background: #eef6f4;
    }
}

.plan-column--current {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}

.plan-current-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #1a1a1a;
    white-space: nowrap;
    background: linear-gradient(90deg, #e8f1ff, #e7fbfb, #e9fbe9, #e7fbfb, #e8f1ff);
    background-size: 300% 100%;
    animation: plan-current-badge 6s linear infinite;
}

@keyframes plan-current-badge {
    from { background-position: 0% 50%; }
    to { background-position: 300% 50%; }
}

.plan-column-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.plan-column-icon {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
    flex: 0 0 auto;
    object-fit: contain;
}

.plan-column-price {
    font-size: 34px;
    font-weight: 700;
    margin: 0;
}

.plan-column--team .plan-column-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.plan-column-price--spacer {
    visibility: hidden;
}

.plan-column-price-suffix {
    font-size: 15px;
    font-weight: 500;
    color: #444;
}

.plan-column-min-seats {
    font-size: 15px;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
}

.plan-column-sub,
.plan-column-note {
    font-size: 14px;
    color: #444;
    margin: 0;
}

.plan-column-list {
    list-style: none;
    padding-left: 0;
    margin: 4px 0 8px;
    font-size: 13px;
    line-height: 1.5;
}

/* One row per card, pinned to the bottom so the three rows line up. */
.plan-column-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: auto 0 0;
    min-height: 44px;
}

.plan-column-cta {
    flex-shrink: 0;
    white-space: nowrap;
}

.plan-column--individual .plan-column-cta-row,
.plan-column--team .plan-column-cta-row {
    justify-content: flex-end;
}

.plan-column--individual .plan-column-cta,
.plan-column--team .plan-column-cta {
    width: auto;
    padding: 10px 12px;
    background-color: #fff4ea;
    border-color: transparent;
    color: #8a4b1f !important;
    box-shadow: none;
    animation: plan-cta-warm 5s ease-in-out infinite;
}

.plan-column--individual .plan-column-cta:hover,
.plan-column--team .plan-column-cta:hover,
.plan-column--individual .plan-column-cta:active,
.plan-column--individual .plan-column-cta:focus,
.plan-column--team .plan-column-cta:active,
.plan-column--team .plan-column-cta:focus {
    transform: none;
    background-color: #ffe4cc;
    border-color: transparent;
    color: #8a4b1f !important;
    box-shadow: none;
    animation: none;
}

@keyframes plan-cta-warm {
    0%, 100% { background-color: #fff4ea; }
    50% { background-color: #ffe4cc; }
}

.payg-amount-pill {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 2px solid #8eadd9;
    border-radius: 999px;
    background: #e8f0fe;
    color: #1e4b8a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
}

.payg-buy-form {
    justify-content: flex-end;
}

.payg-buy-form .plan-column-cta {
    width: auto;
    padding: 10px 12px;
    background-color: #fff4ea;
    border-color: transparent;
    color: #8a4b1f !important;
    box-shadow: none;
    animation: plan-cta-warm 5s ease-in-out infinite;
}

.payg-buy-form .plan-column-cta:hover,
.payg-buy-form .plan-column-cta:active,
.payg-buy-form .plan-column-cta:focus {
    transform: none;
    background-color: #ffe4cc;
    border-color: transparent;
    color: #8a4b1f !important;
    box-shadow: none;
    animation: none;
}

.payg-amount-picker {
    position: relative;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    z-index: 2;
}

.payg-amount-pill {
    display: flex;
    align-items: center;
    min-width: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.payg-amount-pill:hover,
.payg-amount-pill[aria-expanded="true"] {
    border-color: #6f97cf;
    background: #d6e4fb;
    color: #1e4b8a;
    box-shadow: none;
}

.payg-amount-pill-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payg-amount-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 100%;
    width: max-content;
    max-width: min(360px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.12);
}

.payg-amount-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.payg-amount-option:hover,
.payg-amount-option:focus-visible {
    background: #f1f5f9;
    color: #667eea;
    outline: none;
}

.payg-amount-option[aria-selected="true"] {
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
    font-weight: 600;
}

.plan-card {
    border: 1px solid #e4e2dc;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
    background: #fff;
}

.plan-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
}

.plan-card-row {
    font-size: 14px;
    margin: 2px 0;
}

.plan-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.team-page,
.subscribe-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px;
}

.team-seat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 20px;
    font-size: 14px;
}

.team-seat-table th,
.team-seat-table td {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid #ecebe6;
}

.team-invite-form,
.subscribe-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.team-invite-form input[type="email"],
.subscribe-form input[type="text"],
.subscribe-form input[type="number"] {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.team-invite-hint {
    font-size: 12px;
    color: #6b6b63;
}

.team-seat-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-credit-table th.team-credit-num,
.team-credit-table td.team-credit-num {
    text-align: right;
}

.team-credit-row-muted td {
    color: #6b6b63;
}

.team-credit-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.team-credit-form select,
.team-credit-form input[type="number"] {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.team-credit-form input[type="number"] {
    width: 90px;
}

/* Reserved at the bottom so a flash does not change the card height. */
.team-notice-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 36px;
    margin: 12px 0 0;
}

.team-seat-badge {
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
}

.team-page .pricing-messages:not(:has(li)) {
    display: none;
}

.team-card {
    border: 3px solid transparent;
    border-radius: 18px;
    padding: 10px 20px 18px;
    color: #111;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(90deg, #e11d48, #eab308, #e11d48) border-box;
    background-size: 100% 100%, 300% 100%;
    animation: plan-tier-border 6s linear infinite;
}

.dark-theme .team-card,
.dark-theme .team-card h1,
.dark-theme .team-card h2,
.dark-theme .team-card p,
.dark-theme .team-card th,
.dark-theme .team-card td,
.dark-theme .team-card label,
.dark-theme .team-card .plan-odo-row,
.dark-theme .team-card .plan-odo-label {
    color: #111;
}

.team-card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}

.team-card-icon {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    flex: 0 0 auto;
    object-fit: contain;
}

.team-card h2 {
    margin: 18px 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.team-seat-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 4.5rem;
}

.team-card .team-seat-table .dashboard-btn,
.dark-theme .team-card .team-seat-table .dashboard-btn {
    width: auto;
    padding: 6px 12px;
    font-size: 0.82rem;
    background: #fff;
    color: #495057 !important;
}

.team-card .team-invite-form .dashboard-btn,
.dark-theme .team-card .team-invite-form .dashboard-btn {
    width: auto;
    background: #fff;
    color: #495057 !important;
}

.team-card .dashboard-btn:hover,
.team-card .dashboard-btn:focus,
.team-card .dashboard-btn:active,
.dark-theme .team-card .dashboard-btn:hover,
.dark-theme .team-card .dashboard-btn:focus,
.dark-theme .team-card .dashboard-btn:active {
    background: #fff;
    color: #212529 !important;
    border-color: #6c757d;
}

.team-card .team-invite-form input.team-invite-input {
    flex: 0 1 260px;
    width: 260px;
    max-width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 16px;
    border: 2px solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(90deg, #2563eb, #06b6d4, #22c55e, #06b6d4, #2563eb) border-box;
    background-size: 100% 100%, 300% 100%;
    animation: plan-tier-border 4s linear infinite;
    color: #111;
    font: inherit;
}

.team-seat-table .team-seat-actions {
    width: auto;
    margin: 0;
    justify-content: flex-end;
    gap: 4px;
}

.team-seat-table .team-seat-actions form {
    display: flex;
    margin: 0;
}

.team-seat-capacity {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
}

.team-seat-capacity form {
    display: flex;
    min-width: 0;
}

.team-seat-capacity .dashboard-btn,
.dark-theme .team-card .team-seat-capacity .dashboard-btn {
    width: auto;
    min-width: 0;
    height: 36px;
    white-space: nowrap;
}

.team-table-scroll {
    overflow: auto;
    max-height: calc(38px + 5 * 52px);
    margin: 8px 0 4px;
}

.team-card .team-seat-table {
    margin: 0;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.team-card .team-seat-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.team-card .team-credit-num {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dark-theme .team-card .team-credit-row-muted td {
    color: #6b6b63;
}

.team-card .team-move-form {
    align-items: flex-end;
}

.team-card .team-move-form label {
    flex: 1 1 9rem;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    font-size: 13px;
    font-weight: 600;
}

.team-card .team-move-form label:last-of-type {
    flex: 0 1 7.5rem;
}

.team-card .team-move-form select,
.team-card .team-move-form input[type="number"] {
    width: 100%;
    height: 34px;
    min-width: 0;
    max-width: 100%;
    padding: 0 14px;
    border: 1px solid #d6d3cd;
    border-radius: 999px;
    background-color: #fff;
    color: #111;
    font: inherit;
    font-weight: 500;
}

.team-card .team-move-form select,
.team-card .team-credit-form select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.1 4.1 6 8l3.9-3.9 1 1L6 10 1.1 5.1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
}

.team-card .team-move-form input[type="number"] {
    width: 100%;
}

.team-card h2.team-section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 12px;
    font-size: 22px;
    font-weight: 700;
}

.team-card h2.team-section-label::before,
.team-card h2.team-section-label::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #111, #8a8a8a, #111);
}

.team-subsection {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
}

.team-join-form {
    display: flex;
    justify-content: center;
    margin: 16px 0 4px;
}

.team-card .team-invite-form button.team-pill,
.team-card .team-join-form button.team-pill,
.team-card .team-seat-actions button.team-pill,
.team-card .team-seat-table button.team-pill,
.dark-theme .team-card .team-invite-form button.team-pill,
.dark-theme .team-card .team-join-form button.team-pill,
.dark-theme .team-card .team-seat-actions button.team-pill,
.dark-theme .team-card .team-seat-table button.team-pill {
    width: auto;
    height: 36px;
    padding: 0 14px;
    font-size: 0.875rem;
    line-height: 1;
    background: #f4f7fb;
    color: #1f2937 !important;
    border: 1px solid #e6ebf2;
    box-shadow: none;
    transition: background-color 160ms ease, transform 160ms ease;
}

.team-card .team-invite-form button.team-pill:hover,
.team-card .team-invite-form button.team-pill:focus,
.team-card .team-join-form button.team-pill:hover,
.team-card .team-join-form button.team-pill:focus,
.team-card .team-seat-actions button.team-pill:hover,
.team-card .team-seat-actions button.team-pill:focus,
.team-card .team-seat-table button.team-pill:hover,
.team-card .team-seat-table button.team-pill:focus,
.dark-theme .team-card button.team-pill:hover,
.dark-theme .team-card button.team-pill:focus {
    background: #e7eef8;
    color: #1f2937 !important;
    border-color: #d5deea;
    transform: translateY(-1px);
    box-shadow: none;
}

.team-card button.team-pill img {
    width: 16px;
    height: 16px;
    flex: none;
}

.team-card .team-seat-capacity button.team-pill--muted,
.team-card .team-seat-capacity button.team-pill--muted:hover,
.team-card .team-seat-capacity button.team-pill--muted:focus,
.team-card .team-seat-capacity button.team-pill--muted:active,
.dark-theme .team-card .team-seat-capacity button.team-pill--muted,
.dark-theme .team-card .team-seat-capacity button.team-pill--muted:hover,
.dark-theme .team-card .team-seat-capacity button.team-pill--muted:focus,
.dark-theme .team-card .team-seat-capacity button.team-pill--muted:active {
    background: #eceff3;
    color: #9aa3af !important;
    border-color: #e3e6eb;
    transform: none;
    cursor: default;
}

.team-card .team-seat-actions button.team-pill--muted img,
.team-card .team-seat-capacity button.team-pill--muted img {
    opacity: 0.45;
}

.team-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f4f7fb;
    color: #1f2937;
    box-shadow: none;
    cursor: pointer;
    line-height: 1;
}

.team-icon-btn img {
    width: 14px;
    height: 14px;
    display: block;
}

.team-icon-btn:hover,
.team-icon-btn:focus {
    background: #e7eef8;
    outline: none;
}

.team-icon-btn.is-copied,
.team-icon-btn.is-copied:hover,
.team-icon-btn.is-copied:focus {
    background: #dcfce7;
}

.team-icon-btn.is-copied img {
    filter: invert(28%) sepia(62%) saturate(640%) hue-rotate(96deg) brightness(92%) contrast(92%);
}

.team-icon-tooltip {
    position: fixed;
    z-index: 10050;
    max-width: 16rem;
    padding: 3px 8px;
    border-radius: 5px;
    background: #172554;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    width: max-content;
    white-space: normal;
    overflow-wrap: break-word;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.team-icon-tooltip[hidden] {
    display: none !important;
}

.team-icon-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--team-tooltip-arrow, 50%);
    margin-left: -4px;
    border: 4px solid transparent;
    border-top-color: #172554;
}

.team-icon-tooltip.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #172554;
}

/* Copy url: a popover next to the button, gone after 3 s. Fixed, so the modal never moves. */
.team-copy-popover {
    position: fixed;
    z-index: 10051;
    max-width: none;
    padding: 6px 10px;
    white-space: nowrap;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    width: max-content;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
    opacity: 1;
    transition: opacity 200ms ease;
}

.team-copy-popover[hidden] {
    display: none !important;
}

.team-copy-popover.is-fading {
    opacity: 0;
}

.team-copy-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: var(--team-tooltip-arrow, 50%);
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #fff;
}

.team-copy-popover.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #fff;
}

/* Cancel invitation / Remove: the row fades before the card is redrawn. */
.team-seat-table tr.is-leaving td {
    opacity: 0;
    transition: opacity 280ms ease;
}

/* Edit email: the address turns into an input in its cell. */
.team-invite-edit {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.team-invite-edit[hidden] {
    display: none !important;
}

.team-invite-edit-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 240px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid #c7d2e0;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 13px;
}

.team-invite-edit-input:focus {
    border-color: #2563eb;
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .team-seat-table tr.is-leaving td,
    .team-copy-popover {
        transition: none;
    }
}

.team-invite-sent {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #15803d;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.team-invite-check {
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 50%;
    display: block;
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 #15803d;
    animation: team-invite-check-fill 0.4s ease-in-out 0.4s forwards, team-invite-check-scale 0.3s ease-in-out 0.9s both;
}

.team-invite-check-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: #15803d;
    fill: none;
    animation: team-invite-check-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.team-invite-check-path {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #fff;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    animation: team-invite-check-path 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes team-invite-check-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes team-invite-check-path {
    to { stroke-dashoffset: 0; }
}

@keyframes team-invite-check-scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes team-invite-check-fill {
    to { box-shadow: inset 0 0 0 8px #15803d; }
}

@media (prefers-reduced-motion: reduce) {
    .team-card .team-invite-form button.team-pill:hover,
    .team-card .team-invite-form button.team-pill:focus,
    .team-card .team-join-form button.team-pill:hover,
    .team-card .team-join-form button.team-pill:focus,
    .team-card .team-seat-actions button.team-pill:hover,
    .team-card .team-seat-actions button.team-pill:focus,
    .team-card .team-seat-table button.team-pill:hover,
    .team-card .team-seat-table button.team-pill:focus,
    .dark-theme .team-card button.team-pill:hover,
    .dark-theme .team-card button.team-pill:focus,
    .team-card .team-pill:active {
        transform: none;
    }

    .team-invite-check,
    .team-invite-check-circle,
    .team-invite-check-path {
        animation: none;
    }

    .team-invite-check {
        box-shadow: inset 0 0 0 8px #15803d;
    }

    .team-invite-check-circle,
    .team-invite-check-path {
        stroke-dashoffset: 0;
    }
}

body.team-modal-open {
    overflow: hidden;
}

.team-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.team-modal[hidden] {
    display: none !important;
}

.team-modal-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(760px, 100%);
    max-height: 100%;
    min-height: 0;
}

.team-modal-panel {
    position: relative;
    width: 100%;
    max-height: 100%;
    min-height: 0;
}

.team-modal-body {
    max-height: calc(100vh - 24px);
    overflow: auto;
}

.team-modal-body .team-page {
    width: 100%;
    margin: 0;
    padding: 0;
}

.team-modal .team-card {
    border: 1px solid rgba(0, 0, 0, 0.55);
    animation: none;
    padding: 6px 36px 8px 14px;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 8px 32px rgba(17, 17, 17, 0.12);
}

.team-modal .team-card-title {
    margin: 0 0 2px;
    font-size: 20px;
}

.team-modal .team-card-icon {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
}

.team-modal .plan-credit-ribbon--tape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 1px 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 42%, rgba(20, 50, 110, 0.08)),
        linear-gradient(180deg, #d7e6ff 0%, #9ebef0 100%);
    border: 0;
    border-radius: 1px;
    box-shadow: 0 1px 0 rgba(22, 54, 110, 0.28);
    transform: rotate(2deg);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    color: #16325c !important;
}

.team-modal .team-card h2.team-section-label {
    margin: 8px 0 4px;
    gap: 8px;
    font-size: 16px;
}

.team-modal .team-card .team-seat-table thead th {
    background: #fff;
}

.team-modal .team-seat-table th,
.team-modal .team-seat-table td {
    padding: 3px 6px;
}

.team-modal .team-table-scroll {
    margin: 0;
    min-height: calc(26px + 3 * 48px);
    max-height: calc(26px + 3 * 48px);
}

/* Member rows are name and status only. Four of them, then scroll. */
.team-modal .team-card--member .team-table-scroll {
    min-height: calc(28px + 4 * 28px);
    max-height: calc(28px + 4 * 28px);
}

.team-modal .team-invite-form {
    margin: 2px 0;
}

.team-modal .team-seat-capacity {
    margin-top: 4px;
}

.team-modal .team-notice-slot {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    margin: 6px 0 0;
    overflow: hidden;
}

.team-modal .team-card .team-move-form label {
    gap: 2px;
}

.team-modal .team-card .team-invite-form input.team-invite-input,
.team-modal .team-card .team-invite-form button.team-pill,
.team-modal .team-card .team-seat-capacity button.team-pill,
.team-modal .team-seat-capacity .dashboard-btn {
    height: 32px;
}

.team-modal-close {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111;
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
    box-shadow: none;
}

.team-modal-close:hover,
.team-modal-close:focus {
    background: transparent;
    color: #111;
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .team-modal {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: transparent;
    }

    .team-modal .team-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #fff;
    }
}
