/* SpeechHandling – TaleAssistent */
.speech-module {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 2rem;
}

.speech-hero {
    position: relative;
    border-radius: 0.85rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
}

.speech-hero-media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(30, 27, 75, 0.2) 0%, rgba(30, 27, 75, 0.65) 100%),
        linear-gradient(145deg, #1e1b4b 0%, #312e81 35%, #4c1d95 60%, #581c87 100%);
}

.speech-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 85%, rgba(251, 191, 36, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(244, 114, 182, 0.18) 0%, transparent 40%);
}

.speech-hero-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 2.5rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 70%, transparent 100%);
    color: #fff;
}

.speech-hero-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.45);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.speech-hero-title {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    max-width: 760px;
    margin-bottom: 0.75rem;
}

.speech-hero-sub {
    max-width: 640px;
    opacity: 0.92;
    margin-bottom: 1.5rem;
}

.speech-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.speech-btn.e-btn,
.speech-btn {
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    padding: 0.65rem 1.25rem !important;
}

.speech-btn--primary.e-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #fff !important;
}

.speech-btn--secondary.e-btn {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    color: #fff !important;
}

.speech-section {
    margin-bottom: 2.5rem;
}

.speech-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #1e1b4b;
}

/* Felles korttekst – samme farge som prislinjen */
.speech-type-card,
.speech-tier-card {
    color: #4c1d95;
}

.speech-type-card {
    height: 100%;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 0.25rem 1rem rgba(30, 27, 75, 0.06);
}

.speech-type-card h3,
.speech-tier-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.75rem 0 0.35rem;
    color: #4c1d95;
}

.speech-type-card p,
.speech-tier-card ul,
.speech-tier-card li {
    color: #4c1d95;
    opacity: 1;
}

.speech-type-card p {
    margin-bottom: 0;
}

.speech-tier-card ul {
    margin: 0.75rem 0 0;
    padding-left: 1.15rem;
}

.speech-type-icon {
    color: #4c1d95;
}

.speech-tier-card {
    height: 100%;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.speech-tier-card--basic { border-top: 4px solid #94a3b8; }
.speech-tier-card--pro { border-top: 4px solid #7c3aed; }
.speech-tier-card--premium { border-top: 4px solid #f59e0b; }

.speech-tier-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #4c1d95;
    margin: 0.35rem 0 0;
}

.speech-carousel-slide {
    min-height: 280px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, hsl(var(--speech-slide-hue, 260), 55%, 42%) 0%, #1e1b4b 100%);
    display: flex;
    align-items: flex-end;
}

.speech-carousel-caption {
    color: #fff;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    width: 100%;
}

.speech-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    padding: 1.5rem;
    box-shadow: 0 0.35rem 1.25rem rgba(30, 27, 75, 0.06);
}

/* Felles paneltema – samme farger som betaling / mine tekster / priskort */
.speech-module .speech-panel {
    color: #4c1d95;
}

.speech-module .speech-panel .speech-panel-title,
.speech-module .speech-panel h3 {
    color: #4c1d95;
}

.speech-module .speech-panel .speech-panel-lead {
    color: #4c1d95;
    opacity: 0.88;
    margin-bottom: 1.25rem;
}

.speech-module .speech-panel p,
.speech-module .speech-panel label,
.speech-module .speech-form label {
    color: #4c1d95;
    opacity: 1;
}

.speech-module .speech-panel .speech-ai-message {
    color: #4c1d95;
    opacity: 0.82;
}

.speech-module .speech-panel .speech-select-card,
.speech-module .speech-panel .speech-select-card strong,
.speech-module .speech-panel .speech-tier-select,
.speech-module .speech-panel .speech-tier-select h3,
.speech-module .speech-panel .speech-tier-select li,
.speech-module .speech-panel .speech-tier-select small {
    color: #4c1d95;
}

.speech-module .speech-panel .speech-tier-select-price {
    color: #4c1d95;
}

.speech-module .speech-panel .speech-export-preview pre {
    color: #4c1d95;
}

.speech-module .speech-panel .e-btn.e-primary,
.speech-module .speech-panel .speech-btn--pay.e-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    padding: 0.65rem 1.25rem !important;
}

.speech-module .speech-panel .e-btn.e-primary:hover:not(:disabled),
.speech-module .speech-panel .speech-btn--pay.e-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%) !important;
    color: #fff !important;
}

.speech-module .speech-panel .e-btn.e-primary:disabled,
.speech-module .speech-panel .speech-btn--pay.e-btn:disabled {
    opacity: 0.65;
}

.speech-module .speech-panel .speech-btn--outline.e-btn,
.speech-module .speech-panel .e-btn.e-outline,
.speech-module .speech-panel .speech-panel-actions .e-btn:not(.e-primary):not(.speech-btn--pay) {
    background: transparent !important;
    border: 2px solid #4c1d95 !important;
    color: #4c1d95 !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
}

.speech-module .speech-panel .speech-btn--outline.e-btn:hover,
.speech-module .speech-panel .e-btn.e-outline:hover,
.speech-module .speech-panel .speech-panel-actions .e-btn:not(.e-primary):not(.speech-btn--pay):hover {
    background: rgba(76, 29, 149, 0.08) !important;
    color: #4c1d95 !important;
}

.speech-panel-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.speech-panel-lead {
    margin-bottom: 1.25rem;
}

.speech-panel-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.speech-form label {
    display: block;
    font-weight: 600;
    margin: 0.75rem 0 0.35rem;
}

.speech-select-card,
.speech-tier-select {
    width: 100%;
    text-align: left;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.speech-select-card.is-selected,
.speech-tier-select.is-selected {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.speech-tier-select-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4c1d95;
}

.speech-payment-summary {
    padding: 1rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
    color: #4c1d95;
}

.speech-payment-summary p {
    color: #4c1d95;
    opacity: 1;
    margin-bottom: 0.35rem;
}

.speech-payment-summary p:last-child {
    margin-bottom: 0;
}

.speech-payment-title strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #4c1d95;
}

.speech-payment-meta {
    font-weight: 600;
    color: #4c1d95;
}

.speech-payment-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: #4c1d95;
    margin-top: 0.5rem;
}

.speech-payment-email-intro,
.speech-payment-email-sent p {
    color: #4c1d95;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.speech-payment-email-hint {
    font-size: 0.9rem;
    opacity: 0.85;
}

.speech-payment-cancelled {
    color: #4c1d95;
}

.speech-payment-cancelled-lead {
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.speech-panel-actions--stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: flex-start;
}

.speech-paid-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
    margin-bottom: 1rem;
}

.speech-payment-success-panel {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.speech-payment-success-panel .speech-panel-title {
    margin-bottom: 0.75rem;
}

.speech-payment-success-message {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.speech-payment-success-panel .speech-payment-summary {
    text-align: left;
    margin-bottom: 1.5rem;
}

.speech-payment-success-panel .speech-panel-actions {
    justify-content: center;
    margin-top: 0.5rem;
}

.speech-revision-exhausted {
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 0.65rem;
    border: 1px solid #c4b5fd;
    background: #f5f3ff;
    color: #4c1d95;
}

.speech-revision-exhausted p {
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
}

.speech-list-panel .speech-empty {
    color: #4c1d95;
    opacity: 1;
    font-weight: 600;
    padding: 1.5rem 0;
}

.speech-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.speech-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 0.25rem 1rem rgba(30, 27, 75, 0.06);
}

.speech-list-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4c1d95;
    margin: 0 0 0.35rem;
}

.speech-list-item-meta,
.speech-list-item-date {
    color: #4c1d95;
    opacity: 1;
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.speech-list-item-date {
    font-weight: 500;
    font-size: 0.95rem;
}

.speech-status {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    margin-top: 0.5rem;
}

.speech-status--paid {
    background: #ede9fe;
    color: #4c1d95;
    border: 1px solid #c4b5fd;
}

.speech-status--draft {
    background: #fef3c7;
    color: #78350f;
    border: 1px solid #fcd34d;
}

.speech-list-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

.speech-module .speech-panel .speech-btn--danger.e-btn {
    color: #991b1b;
    border-color: #fca5a5;
    background: #fff;
}

.speech-module .speech-panel .speech-btn--danger.e-btn:hover:not(:disabled) {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.speech-list-panel .speech-list-header .speech-btn--pay.e-btn,
.speech-list-panel .speech-list-item-actions .speech-btn--pay.e-btn {
    flex-shrink: 0;
}

.speech-editor-panel {
    position: relative;
}

.speech-ai-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.88);
    border-radius: inherit;
    border: 1px solid #c4b5fd;
}

.speech-ai-loading-overlay .speech-ai-loading-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #4c1d95;
}

.speech-ai-loading-overlay .speech-ai-loading-detail {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #5b21b6;
    max-width: 26rem;
    line-height: 1.5;
}

.speech-editor-panel .speech-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.speech-editor-panel .speech-editor-header p {
    font-weight: 600;
    margin: 0.25rem 0 0;
}

.speech-editor-panel .speech-editor-actions-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.speech-editor-panel .speech-chat {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 1rem;
    height: 100%;
}

.speech-editor-panel .speech-chat .e-btn {
    margin-top: 0.75rem;
}

.speech-editor-panel .col-lg-7 > .e-btn {
    margin-top: 0.75rem;
}

.speech-ai-message {
    margin-top: 0.75rem;
    font-size: 0.92rem;
}

.speech-export-panel .speech-export-preview {
    margin-top: 0.5rem;
}

.speech-export-panel .speech-export-preview pre {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 1rem;
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.speech-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.speech-auth-notice {
    text-align: center;
    padding: 2rem;
    color: #4c1d95;
}

.speech-auth-notice p {
    color: #4c1d95;
    font-weight: 600;
}

.speech-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .speech-hero { min-height: 340px; }
    .speech-list-item { flex-direction: column; align-items: flex-start; }
    .speech-list-item-actions { width: 100%; }
    .speech-list-item-actions .e-btn { flex: 1 1 auto; }
}
