/* AI Loader Animation Styles */

.mobile-view.overflow-auto {
    position: relative;
}

.ai-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 248, 248, 0.95);
    background: radial-gradient(circle, rgb(243 240 240) 0%, rgb(255 255 255) 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.ai-loader-overlay.active {
    display: flex;
}

.rustore-loader-card {
    /* background: #f8f8f8 !important; */
    border-radius: 28px;
    /* box-shadow: 0 0px 40px -20px rgba(0, 0, 0, 0.4); */
    padding: 2rem;
    /* border: 1px solid rgba(0, 0, 0, 0.04) !important; */
}

.rustore-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#particle-canvas {
    width: 320px;
    height: 320px;
    border-radius: 50%;
}

.loader-text {
    margin-bottom: 0;
    font-size: 2rem;
    font-weight: 100;
    color: #4a5fd9;
}

.status-container {
    overflow: hidden;
}

.status-text {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 400;
    color: #4a5fd9;
}

/* AI Validation Overlay */
.ai-validation-overlay {
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3936d3 0%, #5b4fe5 50%, #7c6bf0 100%);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    box-shadow: 0 4px 22px rgba(57, 54, 211, 0.25), 0 0 0 1px rgba(255,255,255,0.1) inset;
    width: 90%;
    margin: 26px auto;
    overflow: hidden;
    padding: 3px;
}

.ai-validation-overlay.active {
    display: flex;
    align-items: flex-start;
    animation: overlaySlideIn 0.35s ease-out;
}

@keyframes overlaySlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* AI Validation Card */
.ai-validation-card {
    width: 100%;
    background: rgba(255,255,255,0.97);
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

/* Header */
.ai-validation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #3936d3, #5b4fe5);
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.ai-validation-header .ai-title {
    color: #fff;
    letter-spacing: -0.01em;
}

.ai-validation-header .ai-score-badge {
    background: rgb(255 255 255);
    padding: 3px 12px;
    border-radius: 20px;
}

/* Section Styles */
.ai-section {
    padding: 1rem 1.25rem;
    background: #fff;
}

.ai-section:last-child {
    border-bottom: none;
    border-radius: 14px;
}

.ai-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ai-section .section-title {
    color: #1e293b;
    font-size: 0.95rem;
}

.ai-section .section-badge {
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.ai-section .section-badge.badge-warning {
    background: #fff3e0;
    color: #e65100;
}

.ai-section .section-badge.badge-info {
    background: #ede7f6;
    color: #5b4fe5;
}

/* Item List Styles */
.ai-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-item-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #475569;
    border-bottom: 1px solid #f1f0f7;
    font-size: 0.93rem;
    line-height: 1.5;
}

.ai-item-list li:last-child {
    border-bottom: none;
}

.ai-item-list li::before {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.ai-warning-list li::before {
    background-color: #fff3e0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23e65100' viewBox='0 0 16 16'%3E%3Cpath d='M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z'/%3E%3C/svg%3E");
}

.ai-suggestion-list li::before {
    background-color: #ede7f6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235b4fe5' viewBox='0 0 16 16'%3E%3Cpath d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z'/%3E%3C/svg%3E");
}

/* Edit Form Button */
.btn-edit-form {
    display: block;
    width: calc(100% - 2.5rem);
    padding: 0.875rem 1.5rem;
    margin: 0.5rem auto 1rem;
    color: #fff;
    background: linear-gradient(135deg, #3936d3, #5b4fe5);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(57, 54, 211, 0.3);
}

.btn-edit-form:hover {
    background: linear-gradient(135deg, #2e2bc0, #4f43d8);
    box-shadow: 0 6px 16px rgba(57, 54, 211, 0.4);
    transform: translateY(-1px);
}

.btn-edit-form:active {
    background: linear-gradient(135deg, #2522a8, #4339c5);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(57, 54, 211, 0.3);
}

/* AI Textarea Character Counter */
.ai-textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #dc3545;
}

.char-counter.success {
    color: #198754;
}
