/* CombatAI Frontend Styles — dark theme compatible */

.combatai-notice {
    padding: 16px;
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 4px;
    margin: 16px 0;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-error {
    padding: 12px 16px;
    background: #451a1a;
    border: 1px solid #dc2626;
    border-radius: 4px;
    color: #fca5a5;
    margin-bottom: 16px;
}

.combatai-success {
    padding: 12px 16px;
    background: #14532d;
    border: 1px solid #22c55e;
    border-radius: 4px;
    color: #86efac;
    margin-bottom: 16px;
}

/* Dashboard */
.combatai-dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-dashboard-header h3 {
    margin: 0;
    flex: 1;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-plan-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.combatai-plan-name {
    background: var(--wp--preset--color--accent-1, #dc2626);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.combatai-upload-count {
    font-size: 14px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
}

/* Plans */
.combatai-plans h3 {
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.combatai-plan-card {
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    border: 2px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: border-color 0.2s;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-plan-card:hover {
    border-color: var(--wp--preset--color--accent-1, #dc2626);
}

.combatai-plan-card h4 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-plan-uploads {
    color: var(--wp--preset--color--accent-4, #9ca3af);
    margin-bottom: 16px;
}

/* Upload form */
.combatai-upload-block {
    margin: 24px 0;
}

.combatai-upload-stats {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
}

.combatai-upload-form {
    padding: 24px;
    border: 2px dashed var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 8px;
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-file-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-file-input input[type="file"] {
    margin-bottom: 8px;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-file-input .description {
    font-size: 13px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    margin-bottom: 16px;
}

.combatai-progress-bar {
    height: 8px;
    background: var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.combatai-progress-fill {
    height: 100%;
    background: var(--wp--preset--color--accent-1, #dc2626);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

.combatai-limit-reached {
    padding: 16px;
    background: #422006;
    border: 1px solid #a16207;
    border-radius: 4px;
    color: #fde047;
}

/* Analyses list */
.combatai-analyses-list h3 {
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-analyses-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.combatai-analyses-header h3 {
    margin: 0;
}

.combatai-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
}

.combatai-per-page select {
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    color: var(--wp--preset--color--contrast, #fff);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 4px;
    padding: 4px 8px;
}

.combatai-total-count {
    color: var(--wp--preset--color--accent-4, #9ca3af);
}

/* Analysis cards */
.combatai-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.combatai-analysis-card {
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 10px;
    padding: 20px 24px;
    transition: border-color 0.2s;
}

.combatai-analysis-card:hover {
    border-color: #3a3a3a;
}

.combatai-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.combatai-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--wp--preset--color--contrast, #fff);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.combatai-card-title:hover {
    color: var(--wp--preset--color--accent-1, #dc2626);
}

.combatai-card-date {
    font-size: 13px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    display: block;
    margin-bottom: 16px;
}

.combatai-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Overflow menu (three-dot) */
.combatai-overflow-menu {
    position: relative;
    margin-left: auto;
}

.combatai-overflow-trigger {
    background: none;
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 6px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s;
}

.combatai-overflow-trigger:hover {
    color: var(--wp--preset--color--contrast, #fff);
    border-color: #3a3a3a;
}

.combatai-overflow-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 8px;
    min-width: 140px;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 4px;
}

.combatai-overflow-menu.is-open .combatai-overflow-dropdown {
    display: block;
}

.combatai-overflow-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--wp--preset--color--contrast, #fff);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.combatai-overflow-item:hover {
    background: var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-overflow-item.combatai-delete-btn {
    color: #f87171;
}

.combatai-overflow-item.combatai-delete-btn:hover {
    background: #451a1a;
}

/* Empty state */
.combatai-empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.combatai-empty-state p { margin: 0; }
.combatai-empty-state .combatai-btn { margin-top: 4px; }

/* Legacy table (kept for backward compat) */
.combatai-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.combatai-table th,
.combatai-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-table th {
    font-weight: 600;
    background: var(--wp--preset--color--accent-2, #1a1a1a);
}

.combatai-actions {
    display: flex;
    gap: 8px;
}

/* Pagination */
.combatai-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-page-info {
    font-size: 14px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
}

/* Status badges */
.combatai-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.combatai-status-processing {
    background: #422006;
    color: #fde047;
}

.combatai-status-completed {
    background: #14532d;
    color: #86efac;
}

/* Buttons */
.combatai-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s;
}

.combatai-btn-primary {
    background: var(--wp--preset--color--contrast, #fff);
    color: var(--wp--preset--color--base, #0a0a0a);
}

.combatai-btn-primary:hover {
    background: #e5e5e5;
}

.combatai-btn-secondary {
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    color: var(--wp--preset--color--contrast, #fff);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-btn-secondary:hover {
    background: var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-btn-small {
    padding: 4px 12px;
    font-size: 13px;
}

/* ── New Analysis Modal ── */

.combatai-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: combatai-fade-in 0.2s ease;
}

@keyframes combatai-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes combatai-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.combatai-modal {
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 12px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: combatai-slide-up 0.25s ease;
}

.combatai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-modal-close {
    background: none;
    border: none;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.combatai-modal-close:hover {
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-modal-body {
    padding: 24px;
}

.combatai-form-field {
    margin-bottom: 20px;
}

.combatai-form-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-form-field input[type="text"],
.combatai-form-field select,
.combatai-form-field textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--wp--preset--color--base, #0a0a0a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 6px;
    color: var(--wp--preset--color--contrast, #fff);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.combatai-form-field input[type="text"]:focus,
.combatai-form-field select:focus,
.combatai-form-field textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--accent-1, #dc2626);
}

.combatai-form-field textarea {
    resize: vertical;
    min-height: 72px;
}

/* Dropzone */
.combatai-dropzone {
    position: relative;
    border: 2px dashed var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--wp--preset--color--base, #0a0a0a);
}

.combatai-dropzone:hover,
.combatai-dropzone.is-dragover {
    border-color: var(--wp--preset--color--accent-1, #dc2626);
    background: rgba(220, 38, 38, 0.05);
}

.combatai-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.combatai-dropzone-icon {
    display: block;
    font-size: 28px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    margin-bottom: 8px;
}

.combatai-dropzone-text {
    color: var(--wp--preset--color--contrast, #fff);
    font-size: 14px;
    margin: 0 0 4px;
}

.combatai-dropzone .description {
    font-size: 12px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    margin: 0;
}

/* Selected file display */
.combatai-file-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--wp--preset--color--base, #0a0a0a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 6px;
}

.combatai-file-name {
    font-size: 13px;
    color: var(--wp--preset--color--contrast, #fff);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.combatai-file-remove {
    background: none;
    border: none;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.combatai-file-remove:hover {
    color: var(--wp--preset--color--accent-1, #dc2626);
}

/* Limit message inside modal */
.combatai-modal-body .combatai-limit-reached {
    margin: 0;
}

/* Upload error inside modal */
.combatai-upload-error {
    padding: 10px 14px;
    background: #451a1a;
    border: 1px solid #dc2626;
    border-radius: 6px;
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Modal footer */
.combatai-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

@media (max-width: 540px) {
    .combatai-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .combatai-modal-overlay {
        padding: 0;
    }
}

/* Video player */
.combatai-video-player {
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

/* Analysis view */
.combatai-analysis-single {
    width: 100%;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-analysis-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--wp--preset--spacing--40, 1.5rem);
}

.combatai-analysis-single h1,
.combatai-analysis-single h2 {
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-analysis-meta {
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 14px;
    margin-bottom: 24px;
}

.combatai-analysis-single .combatai-video-player {
    max-width: 640px;
    margin: 0 auto 24px;
    padding: 0 var(--wp--preset--spacing--40, 1.5rem);
}

.combatai-analysis-single .combatai-video-player video {
    width: 100%;
    height: auto;
    display: block;
}

.combatai-rich-text {
    line-height: 1.7;
    color: var(--wp--preset--color--contrast, #fff);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--wp--preset--spacing--40, 1.5rem);
}

.combatai-processing-notice {
    padding: 24px;
    background: #422006;
    border: 1px solid #a16207;
    border-radius: 8px;
    text-align: center;
    color: #fde047;
    max-width: 1200px;
    margin: 0 auto;
}

/* Completed analysis with no available report — same box as the processing
   notice, neutral colouring. */
.combatai-report-unavailable {
    padding: 24px;
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 8px;
    text-align: center;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    max-width: 1200px;
    margin: 0 auto;
}

.combatai-report-unavailable p {
    margin: 0;
}

/* Inline HTML report — full width, scrolls with the page */
.combatai-report-inline {
    width: 100%;
}

/* Access Denied */
.combatai-access-denied {
    max-width: 540px;
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 6rem) 24px;
    text-align: center;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-access-denied-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 24px;
}

.combatai-access-denied h1 {
    margin: 0 0 16px;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-access-denied-message {
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.combatai-access-denied-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Report iframe — blends with the page and scrolls as one section */
.combatai-analysis-report {
    margin: 24px 0;
    width: 100%;
}

.combatai-report-iframe {
    display: block;
    width: 100%;
    min-height: 600px; /* placeholder until the resize script measures content */
    border: 0;
    background: rgb(10, 10, 10);
}

/* ── Profile ── */

.combatai-profile {
    max-width: 720px;
    margin: 0 auto;
}

.combatai-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-profile-avatar img {
    border-radius: 50%;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 2px solid var(--wp--preset--color--accent-3, #2a2a2a);
}

.combatai-profile-name {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--wp--preset--color--contrast, #fff);
    text-transform: none;
    letter-spacing: normal;
}

.combatai-profile-email {
    margin: 0;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 14px;
}

.combatai-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

@media (max-width: 540px) {
    .combatai-profile-grid {
        grid-template-columns: 1fr;
    }
}

.combatai-profile-card {
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.combatai-profile-card-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp--preset--color--accent-4, #9ca3af);
}

.combatai-profile-card-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-profile-card-value--large {
    font-size: 2rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.combatai-profile-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.combatai-profile-badge--active {
    background: #14532d;
    color: #86efac;
}

.combatai-profile-badge--inactive {
    background: #422006;
    color: #fde047;
}

.combatai-profile-actions {
    text-align: center;
    padding-top: 8px;
}

.combatai-profile-actions .combatai-btn {
    font-size: 15px;
    padding: 12px 32px;
}

.combatai-profile-actions-hint {
    margin-top: 12px;
    color: var(--wp--preset--color--accent-4, #9ca3af);
    font-size: 13px;
}

/* Profile menu (header dropdown for logged-in users) */
.cai-profile-menu { position: relative; }
.is-layout-flex > div > .cai-profile-menu { padding-left: 8px; }
.cai-profile-trigger {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.06); color: #fff;
	cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.cai-profile-trigger:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }
.cai-profile-dropdown {
	display: none; position: absolute; top: calc(100% + 8px); right: 0;
	min-width: 160px; background: #1a1a1a;
	border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.4); overflow: hidden; z-index: 1000;
}
.cai-profile-menu.is-open .cai-profile-dropdown { display: block; }
.cai-profile-dropdown a {
	display: block; padding: 10px 16px; color: #9ca3af;
	font-size: 0.875rem; text-decoration: none;
	transition: background 0.12s, color 0.12s;
}
.cai-profile-dropdown a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.cai-profile-dropdown a + a { border-top: 1px solid rgba(255,255,255,0.06); }

/* Testimonial avatar placeholder */
.cai-testimonial-avatar {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border-radius: 50%;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
	color: rgba(255,255,255,0.45); flex-shrink: 0;
}

/* Free-account dashboard */
.combatai-free-dashboard {
	max-width: 1040px;
	margin: 0 auto;
	color: var(--wp--preset--color--contrast, #fff);
}

.combatai-free-dashboard-hero {
	padding: clamp(28px, 5vw, 56px);
	border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(220,38,38,0.12), rgba(26,26,26,0.96) 48%);
}

.combatai-free-badge,
.cai-account-kicker,
.cai-co-account-ready {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(220,38,38,0.14);
	color: #fca5a5;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.combatai-free-dashboard-hero h2 {
	margin: 18px 0 12px;
	font-size: clamp(2rem, 5vw, 3.5rem);
	line-height: 1.05;
}

.combatai-free-dashboard-hero p {
	max-width: 720px;
	margin: 0;
	color: var(--wp--preset--color--accent-4, #9ca3af);
	font-size: 17px;
	line-height: 1.7;
}

.combatai-free-resources {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 24px 0;
}

.combatai-free-resource {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 180px;
	padding: 24px;
	border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
	border-radius: 12px;
	background: var(--wp--preset--color--accent-2, #1a1a1a);
	color: var(--wp--preset--color--contrast, #fff);
	text-decoration: none;
	transition: transform 0.18s, border-color 0.18s;
}

.combatai-free-resource:hover {
	transform: translateY(-2px);
	border-color: rgba(220,38,38,0.65);
}

.combatai-free-resource-step {
	color: #f87171;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.combatai-free-resource strong { font-size: 17px; }
.combatai-free-resource > span:last-child {
	color: var(--wp--preset--color--accent-4, #9ca3af);
	font-size: 14px;
	line-height: 1.55;
}

.combatai-free-next-step {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 28px;
	border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
	border-radius: 12px;
}

.combatai-free-next-step h3 { margin: 0 0 6px; }
.combatai-free-next-step p {
	margin: 0;
	color: var(--wp--preset--color--accent-4, #9ca3af);
}
.combatai-free-next-step .combatai-btn { flex-shrink: 0; }
.combatai-free-history { max-width: 1040px; margin: 48px auto 0; }
.combatai-free-history > h3 { margin-bottom: 18px; }

/* Standalone free-account page */
.cai-account {
	min-height: calc(100vh - 80px);
	padding: 56px 24px;
	background: var(--wp--preset--color--base, #0a0a0a);
	color: #fff;
}

.cai-account-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
	gap: clamp(40px, 7vw, 88px);
	align-items: center;
	max-width: 1080px;
	margin: 0 auto;
}

.cai-account-intro h1 {
	max-width: 680px;
	margin: 18px 0;
	font-size: clamp(2.4rem, 6vw, 4.75rem);
	line-height: 0.98;
	letter-spacing: -0.035em;
}

.cai-account-intro > p {
	max-width: 620px;
	margin: 0 0 28px;
	color: #b3b8c2;
	font-size: 17px;
	line-height: 1.7;
}

.cai-account-benefits { font-size: 14px; }

.cai-account-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: clamp(24px, 4vw, 36px);
	border: 1px solid #2a2a2a;
	border-radius: 14px;
	background: #151515;
	box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}

.cai-account-form h2 { margin: 0 0 4px; font-size: 24px; }
.cai-account-form > div:first-child p { margin: 0; color: #9ca3af; font-size: 14px; }
.cai-account-passwords { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cai-legal-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: #d1d5db;
	font-size: 13px;
	line-height: 1.5;
	cursor: pointer;
}
.cai-legal-consent input {
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	flex: 0 0 auto;
	accent-color: #dc2626;
}
.cai-legal-consent a { color: #f3f4f6; text-decoration: underline; }
.cai-legal-consent a:hover { color: #ffffff; }

.cai-legal-page {
	max-width: 880px;
	margin: 0 auto;
	padding: clamp(40px, 7vw, 80px) 24px;
}
.cai-legal-page > h1 { margin-bottom: 8px; }
.cai-legal-updated { color: #9ca3af; font-size: 14px; }
.cai-legal-section { margin-top: 36px; }
.cai-legal-section h2 { margin-bottom: 14px; }
.cai-legal-section p,
.cai-legal-section li { line-height: 1.75; }
.cai-legal-section li + li { margin-top: 8px; }
.cai-account-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cai-account-login { margin: 0; color: #9ca3af; font-size: 14px; text-align: center; }
.cai-account-login a { color: #fff; }

.cai-account--complete { display: grid; place-items: center; }
.cai-account-complete {
	max-width: 620px;
	padding: 48px;
	border: 1px solid #2a2a2a;
	border-radius: 16px;
	background: #151515;
	text-align: center;
}
.cai-account-complete h1 { margin: 18px 0 12px; }
.cai-account-complete p { margin: 0 0 28px; color: #9ca3af; }

@media (max-width: 820px) {
	.combatai-free-resources { grid-template-columns: 1fr; }
	.combatai-free-resource { min-height: 0; }
	.cai-account-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
	.combatai-free-next-step { align-items: stretch; flex-direction: column; }
	.combatai-free-next-step .combatai-btn { text-align: center; }
	.cai-account-passwords { grid-template-columns: 1fr; }
	.cai-account { padding: 36px 16px; }
	.cai-account-form { padding: 22px; }
	.cai-account-complete { padding: 32px 22px; }
}

/* ─────────────────────────── Checkout ─────────────────────────── */
.cai-checkout { min-height: calc(100vh - 80px); background: var(--wp--preset--color--base, #0a0a0a); color: #fff; padding: 56px 24px; }
.cai-checkout-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 880px) { .cai-checkout-inner { grid-template-columns: 1fr; gap: 32px; } }

/* Member report changelog */
.cai-report-updates {
	box-sizing: border-box;
	width: min(100%, 1180px);
	margin: 0 auto;
	padding: clamp(44px, 7vw, 96px) clamp(18px, 4vw, 48px) clamp(72px, 10vw, 128px);
	color: var(--wp--preset--color--contrast, #fff);
}

.cai-report-updates *,
.cai-report-updates *::before,
.cai-report-updates *::after {
	box-sizing: border-box;
}

.cai-report-updates__hero {
	position: relative;
	overflow: hidden;
	padding: clamp(34px, 6vw, 68px);
	border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
	border-radius: 20px;
	background:
		radial-gradient(circle at 92% 8%, rgba(220, 38, 38, 0.22), transparent 34%),
		linear-gradient(135deg, #1a1a1a, #101010 72%);
}

.cai-report-updates__hero::before {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 5px;
	background: var(--wp--preset--color--accent-1, #dc2626);
	content: "";
}

.cai-report-updates__kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	color: #f87171;
	font-size: 0.75rem;
	font-weight: 750;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.cai-report-updates__kicker::before {
	width: 28px;
	height: 2px;
	background: currentColor;
	content: "";
}

.cai-report-updates__hero h1 {
	max-width: 12ch;
	margin: 0;
	font-size: clamp(2.6rem, 8vw, 5.75rem);
	letter-spacing: -0.015em;
	line-height: 0.98;
}

.cai-report-updates__hero p {
	max-width: 720px;
	margin: 22px 0 0;
	color: #b5bac3;
	font-size: clamp(1rem, 2vw, 1.2rem);
	line-height: 1.7;
}

.cai-report-updates__timeline {
	position: relative;
	display: grid;
	gap: 24px;
	margin-top: clamp(36px, 6vw, 64px);
}

.cai-report-updates__timeline::before {
	position: absolute;
	top: 22px;
	bottom: 22px;
	left: 111px;
	width: 1px;
	background: linear-gradient(to bottom, #dc2626, #343434 14%, #343434 86%, transparent);
	content: "";
}

.cai-report-update {
	position: relative;
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 38px;
	margin: 0;
}

.cai-report-update__date {
	position: relative;
	padding-top: 24px;
	text-align: right;
}

.cai-report-update__date time {
	display: grid;
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.25;
}

.cai-report-update__date small {
	color: var(--wp--preset--color--accent-4, #9ca3af);
	font-size: 0.75rem;
	font-weight: 500;
}

.cai-report-update__marker {
	position: absolute;
	top: 29px;
	right: -6px;
	width: 12px;
	height: 12px;
	border: 3px solid #0a0a0a;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-1, #dc2626);
	box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.65);
}

.cai-report-update__card {
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
	border-radius: 16px;
	background: var(--wp--preset--color--accent-2, #1a1a1a);
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.cai-report-update__image {
	margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
	background: #111;
}

.cai-report-update__image img {
	display: block;
	width: 100%;
	max-height: 520px;
	object-fit: cover;
}

.cai-report-update__body {
	padding: clamp(24px, 4vw, 44px);
}

.cai-report-update__body h2 {
	margin: 0 0 20px;
	font-size: clamp(1.6rem, 4vw, 2.5rem);
	letter-spacing: 0.015em;
	line-height: 1.08;
}

.cai-report-update__content {
	color: #c9cbd0;
	font-size: clamp(0.96rem, 1.5vw, 1.075rem);
	line-height: 1.75;
}

.cai-report-update__content > *:first-child {
	margin-top: 0;
}

.cai-report-update__content > *:last-child {
	margin-bottom: 0;
}

.cai-report-update__content h3,
.cai-report-update__content h4 {
	margin-top: 1.65em;
	margin-bottom: 0.55em;
	color: #fff;
}

.cai-report-update__content a {
	color: #f87171;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.cai-report-update__content ul,
.cai-report-update__content ol {
	padding-left: 1.35em;
}

.cai-report-update__content li + li {
	margin-top: 0.45em;
}

.cai-report-update__content blockquote {
	margin: 1.5em 0;
	padding: 0.25em 0 0.25em 1.25em;
	border-left: 3px solid var(--wp--preset--color--accent-1, #dc2626);
	color: #fff;
}

.cai-report-update__content img {
	height: auto;
	border-radius: 10px;
}

.cai-report-update__edit {
	display: inline-flex;
	margin-top: 24px;
	color: var(--wp--preset--color--accent-4, #9ca3af);
	font-size: 0.8rem;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
}

.cai-report-update__edit:hover,
.cai-report-update__edit:focus-visible {
	color: #fff;
}

.cai-report-updates__empty {
	margin-top: clamp(36px, 6vw, 64px);
	padding: clamp(34px, 6vw, 60px);
	border: 1px dashed #3a3a3a;
	border-radius: 16px;
	background: #141414;
	text-align: center;
}

.cai-report-updates__empty > span {
	display: inline-grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border: 1px solid rgba(220, 38, 38, 0.5);
	border-radius: 50%;
	background: rgba(220, 38, 38, 0.1);
	color: #f87171;
	font-family: var(--wp--preset--font-family--oswald, "Oswald", sans-serif);
	font-weight: 700;
}

.cai-report-updates__empty h2 {
	margin: 20px 0 10px;
	font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.cai-report-updates__empty p {
	max-width: 620px;
	margin: 0 auto;
	color: var(--wp--preset--color--accent-4, #9ca3af);
}

.cai-report-updates__pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 40px 0 0 150px;
}

.cai-report-updates__pagination .page-numbers {
	display: inline-grid;
	min-width: 42px;
	min-height: 42px;
	place-items: center;
	padding: 8px 12px;
	border: 1px solid #333;
	border-radius: 8px;
	background: #161616;
	color: #c9cbd0;
	font-size: 0.875rem;
	font-weight: 650;
	text-decoration: none;
}

.cai-report-updates__pagination .page-numbers:hover,
.cai-report-updates__pagination .page-numbers:focus-visible,
.cai-report-updates__pagination .page-numbers.current {
	border-color: var(--wp--preset--color--accent-1, #dc2626);
	background: rgba(220, 38, 38, 0.12);
	color: #fff;
}

@media (max-width: 700px) {
	.cai-report-updates__timeline {
		gap: 18px;
	}

	.cai-report-updates__timeline::before {
		left: 6px;
	}

	.cai-report-update {
		grid-template-columns: 1fr;
		gap: 10px;
		padding-left: 26px;
	}

	.cai-report-update__date {
		padding-top: 0;
		text-align: left;
	}

	.cai-report-update__date time {
		display: flex;
		gap: 5px;
	}

	.cai-report-update__date small {
		font-size: inherit;
	}

	.cai-report-update__marker {
		top: 4px;
		right: auto;
		left: -25px;
	}

	.cai-report-updates__pagination {
		margin-left: 26px;
	}
}

/* Checkout controls continued */
.cai-co-back { display: inline-block; color: #9ca3af; text-decoration: none; font-size: 14px; margin-bottom: 24px; transition: color 0.15s; }
.cai-co-back:hover { color: #fff; }
.cai-co-title { font-size: 28px; margin: 0 0 8px; letter-spacing: 0.01em; line-height: 1.2; }
.cai-co-sub { color: #9ca3af; margin: 0 0 32px; font-size: 15px; }

.cai-co-tiers { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.cai-co-tier {
	display: flex; align-items: center; gap: 16px;
	padding: 18px 20px; border: 1px solid #2a2a2a; border-radius: 10px;
	background: #1a1a1a; cursor: pointer;
	transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.cai-co-tier:hover { border-color: #3a3a3a; }
.cai-co-tier.is-selected { border-color: #dc2626; background: rgba(220,38,38,0.06); }
.cai-co-tier.is-disabled { opacity: 0.62; cursor: wait; }
.cai-co-tier input[type="radio"] {
	width: 18px; height: 18px; margin: 0; accent-color: #dc2626; cursor: pointer; flex-shrink: 0;
}
.cai-co-tier-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cai-co-tier-name { font-weight: 600; font-size: 15px; }
.cai-co-tier-meta { color: #9ca3af; font-size: 13px; }
.cai-co-tier-price { font-weight: 600; font-size: 15px; white-space: nowrap; }

.cai-co-total {
	display: flex; justify-content: space-between; align-items: baseline;
	padding: 20px 0; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a;
	margin-bottom: 24px;
}
.cai-co-total-label { color: #9ca3af; font-size: 14px; }
.cai-co-total-amount { font-size: 24px; font-weight: 700; }

.cai-co-trust { list-style: none; padding: 0; margin: 0; color: #9ca3af; font-size: 13px; }
.cai-co-trust li { padding: 6px 0 6px 24px; position: relative; }
.cai-co-trust li::before {
	content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 14px;
	background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2310b981" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center/contain no-repeat;
}

.cai-co-form { display: flex; flex-direction: column; gap: 24px; }
.cai-co-fields {
	border: 1px solid #2a2a2a; border-radius: 10px; padding: 24px; margin: 0;
	background: #1a1a1a; display: flex; flex-direction: column; gap: 16px;
}
.cai-co-fields legend {
	padding: 0 8px; margin-left: -8px; color: #fff; font-size: 13px;
	font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.cai-co-field { display: flex; flex-direction: column; gap: 6px; }
.cai-co-field label { color: #9ca3af; font-size: 13px; font-weight: 500; }
.cai-co-field input {
	background: #0a0a0a; border: 1px solid #2a2a2a; border-radius: 8px;
	padding: 12px 14px; color: #fff; font: inherit; font-size: 15px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.cai-co-field input:focus { outline: none; border-color: #dc2626; box-shadow: 0 0 0 1px #dc2626; }
.cai-co-hint { margin: 0; color: #6b7280; font-size: 12px; }
.cai-co-signed-in { margin: 0; color: #9ca3af; font-size: 14px; }

.cai-co-payment-element { min-height: 280px; }

.cai-co-error {
	background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.3);
	color: #f87171; padding: 12px 16px; border-radius: 8px; font-size: 14px;
}

.cai-co-submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	padding: 16px 24px; border: 0; border-radius: 10px; cursor: pointer;
	background: #fff; color: #0a0a0a; font: inherit; font-weight: 600; font-size: 16px;
	letter-spacing: 0.01em; transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.cai-co-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,0.12); }
.cai-co-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.cai-co-submit-spinner {
	width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid rgba(10,10,10,0.2); border-top-color: #0a0a0a;
	animation: cai-spin 0.7s linear infinite;
}
@keyframes cai-spin { to { transform: rotate(360deg); } }

.cai-co-fine { color: #6b7280; font-size: 12px; line-height: 1.5; margin: 0; }
.cai-co-fine a { color: #9ca3af; text-decoration: underline; }

/* ── Analysis Comments ── */

.combatai-comments {
    max-width: 900px;
    margin: 32px auto 0;
    border-top: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    padding-top: 8px;
}

.combatai-comments-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    padding: 12px 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--wp--preset--color--contrast, #fff);
    user-select: none;
}

.combatai-comments-summary::-webkit-details-marker { display: none; }

.combatai-comments-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform 0.2s;
    opacity: 0.7;
}

.combatai-comments[open] .combatai-comments-caret {
    transform: rotate(90deg);
}

.combatai-comments-count { font-variant-numeric: tabular-nums; }

.combatai-comments-body {
    padding: 8px 4px 4px;
}

.combatai-comment-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.combatai-comment {
    display: flex;
    gap: 12px;
}

.combatai-comment-avatar img {
    border-radius: 50%;
    display: block;
}

.combatai-comment-main { flex: 1; min-width: 0; }

.combatai-comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.combatai-comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--wp--preset--color--contrast, #fff);
}

.combatai-comment-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1px 7px;
    border-radius: 8px;
    background: #14532d;
    color: #86efac;
}

.combatai-comment-date {
    font-size: 12px;
    color: #9ca3af;
}

.combatai-comment-body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--wp--preset--color--contrast, #e5e5e5);
    word-wrap: break-word;
}

.combatai-comment-body p { margin: 0 0 8px; }
.combatai-comment-body p:last-child { margin-bottom: 0; }

.combatai-comments-empty {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 20px;
}

.combatai-comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.combatai-comment-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--wp--preset--color--accent-3, #2a2a2a);
    background: var(--wp--preset--color--accent-2, #1a1a1a);
    color: var(--wp--preset--color--contrast, #fff);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.combatai-comment-input:focus {
    outline: none;
    border-color: var(--wp--preset--color--contrast, #fff);
}

.combatai-comment-error {
    color: #f87171;
    font-size: 13px;
}

.combatai-comment-form-actions {
    display: flex;
    justify-content: flex-end;
}
