/* Frontend CSS for Loan Analysis - Matched to Ador Theme */

/* Force centering with high specificity */
.block-content-wrapper .content-wrapper__content.entry-content.loan-analysis-centered-wrapper {
    margin: 0 auto !important;
    max-width: var(--content-width, 703px);
}

.loan-analysis-feedback {
    background: var(--color-background-neutral-subtle, #ffede5);
    color: var(--color-text-primary, #2b0417);
    font-family: var(--font-family-default, 'TWK Lausanne', arial, sans-serif);
    margin: var(--spacing-xl, 32px) 0;
    padding: var(--spacing-l, 24px);
    border-radius: var(--radius-2xs, 2px);
    width: 100%;
}

@media (width >= 1024px) {
    .loan-analysis-feedback {
        padding: var(--spacing-xl, 32px);
    }
}

.feedback-title {
    font: 400 var(--text-styles-base-h3-font-size, 32px) / var(--text-styles-base-h3-line-height, 1.1)
        var(--font-family-heading, 'TWK Lausanne', arial, sans-serif);
    margin-bottom: var(--spacing-l, 24px);
    letter-spacing: -0.02em;
    font-weight: 500;
}

.feedback-additional-text {
    font: 400 var(--text-styles-interface-s-font-size, 18px) / var(--text-styles-interface-s-line-height, 1.4)
        var(--font-family-default, 'TWK Lausanne', arial, sans-serif);
    margin-bottom: var(--spacing-xl, 32px);
    opacity: 0.9; /* Increased for better readability */
}

@media (width >= 1024px) {
    .feedback-title {
        font-size: var(--text-styles-base-h2-font-size, 48px);
        margin-bottom: var(--spacing-xl, 32px);
    }
}

.feedback-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-l, 24px);
    margin-bottom: var(--spacing-m, 16px);
    padding: var(--spacing-l, 24px);
    background: #fff; /* Solid white for maximum contrast */
    border-radius: var(--radius-2xs, 2px);
    box-shadow: 0 4px 12px rgb(43 4 23 / 5%); /* Subtle brand-tinted shadow */
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.feedback-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgb(43 4 23 / 8%);
}

.feedback-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px; /* Align with first line of Lausanne text */
}

.feedback-text {
    flex: 1;
    font: 400 var(--text-styles-interface-m-font-size, 18px) / var(--text-styles-interface-m-line-height, 1.4)
        var(--font-family-default, 'TWK Lausanne', arial, sans-serif);
}

/* Status Colors - Refined indicators */
.feedback-item.potentialPositive {
    border-left: 6px solid #28a745;
}

.feedback-item.potentialPositive .feedback-icon {
    color: #28a745;
}

.feedback-item.potentialNeutral {
    border-left: 6px solid #ffc107;
}

.feedback-item.potentialNeutral .feedback-icon {
    color: #ffc107;
}

.feedback-item.potentialNegative {
    border-left: 6px solid #dc3545;
}

.feedback-item.potentialNegative .feedback-icon {
    color: #dc3545;
}

/* Error Details */
.error-details,
.error {
    background: #f8d7da;
    color: #721c24;
    padding: var(--spacing-m, 16px);
    border-radius: var(--radius-2xs, 2px);
    margin: var(--spacing-m, 0);
}

/* PDF Order Block Styling */
.loan-analysis-pdf-order {
    margin: var(--spacing-xl, 32px) 0 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center for better balance */
    gap: var(--spacing-m, 16px);
}

.loan-analysis-pdf-description {
    font: 400 var(--text-styles-interface-s-font-size, 16px) / var(--text-styles-interface-s-line-height, 1.4)
        var(--font-family-default, 'TWK Lausanne', arial, sans-serif);
    color: var(--color-text-primary, #2b0417);
    text-align: center; /* Center text */
    max-width: 500px;
    opacity: 0.9;
}

/* Button override - Premium Brand Alignment */
.loan-analysis-pdf-button.button-primary {
    /* Base styles from theme, but ensuring perfect alignment here */
    cursor: pointer;
    border: none;
    font-family: var(--font-family-default, 'TWK Lausanne', arial, sans-serif);
    padding: var(--spacing-m, 20px) var(--spacing-xl, 40px); /* Slightly larger for prominence */
    font-size: 18px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all var(--anim-hover-duration-fast, 0.2s) var(--anim-hover-ease, ease);
}

.loan-analysis-pdf-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toast Notifications - Centered & Branded */
.ador-la-toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m, 16px);
    pointer-events: none; /* Allow clicking through container */
}

.ador-la-toast {
    background: var(--color-background-accent-primary, #2b0417);
    color: #fff;
    padding: var(--spacing-l, 24px) var(--spacing-xl, 32px);
    border-radius: var(--radius-xs, 4px);
    box-shadow: 0 10px 40px rgb(0 0 0 / 30%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-l, 24px);
    pointer-events: auto; /* Re-enable for toast itself */
    animation: ador-la-scale-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    font-family: var(--font-family-heading, 'TWK Lausanne', arial, sans-serif);
    font-size: var(--text-styles-base-h4-font-size, 24px);
    text-align: center;
    min-width: 320px;
    border: 1px solid rgb(255 255 255 / 10%);
}

.ador-la-toast.success {
    /* No bottom border */
}

.ador-la-toast.error {
    /* No bottom border */
}

.ador-la-toast-close {
    background: rgb(255 255 255 / 10%);
    border: none;
    color: #fff;
    font-size: 32px; /* Slightly larger for better 'x' look */
    cursor: pointer;
    line-height: normal;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ador-la-toast-close span {
    display: block;
    line-height: 0;
    margin-top: -4px; /* Manual adjustment if needed, but flex should handle it */
}

.ador-la-toast-close:hover {
    background: rgb(255 255 255 / 20%);
    transform: rotate(90deg);
}

@keyframes ador-la-scale-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ador-la-toast.fade-out {
    animation: ador-la-scale-out 0.3s ease-in forwards;
}

@keyframes ador-la-scale-out {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(0.9);
        opacity: 0;
    }
}
