/* فایل استایل اختصاصی: style.css */

/* دکمه اصلی */
.style-match-btn {
    background-color: #f3afc4;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.style-match-btn:hover {
    background-color: #e598b0;
    transform: translateY(-2px);
}

.style-match-btn i {
    font-size: 1.2em;
}

/* ساختار مودال */
.style-match-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.style-match-modal-content {
    background-color: #ffffff;
    margin: 5% auto; /* کمی بالاتر آوردم */
    padding: 0;
    border: 2px solid #b5d7e8;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {top: -50px; opacity: 0;}
    to {top: 0; opacity: 1;}
}

.close-modal {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    left: 15px;
    top: 5px;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: #f3afc4;
}

/* محتوای داخلی مودال */
.style-match-body {
    padding: 30px;
    text-align: right;
    direction: rtl;
}

/* باکس اصلی متن هوش مصنوعی */
.style-match-advice-text {
    background: #f9fcfe;
    border-right: 4px solid #b5d7e8;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* استایل‌دهی به خروجی‌های ساختاریافته هوش مصنوعی */
.ai-structured-content h5 {
    font-size: 15px;
    font-weight: bold;
    color: #0073aa; /* رنگ آبی ملایم برای سوالات */
    margin-top: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.ai-structured-content h5::before {
    content: '•';
    color: #f3afc4;
    font-size: 20px;
    margin-left: 5px;
    line-height: 0;
}

.ai-structured-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 10px;
    text-align: justify;
}

/* حذف فاصله اولین پاراگراف (مقدمه) */
.ai-structured-content p:first-of-type {
    margin-top: 0;
    font-weight: 500;
}

.style-match-advice-text h4, .style-match-body h4 {
    margin-top: 0;
    color: #2c3e50;
    font-weight: bold;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* گرید محصولات پیشنهادی */
.suggested-products-grid {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.suggested-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    width: 45%;
    text-align: center;
    transition: transform 0.2s;
}

.suggested-item:hover {
    transform: scale(1.02);
    border-color: #b5d7e8;
}

.suggested-item img {
    border-radius: 8px;
    margin-bottom: 10px;
    max-height: 150px;
    width: 100%;
    object-fit: cover;
}

.suggested-item h5 {
    font-size: 13px;
    margin: 5px 0 10px 0;
    color: #555;
    height: 35px;
    overflow: hidden;
}

.view-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: #b5d7e8;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    width: 80%;
}

.view-btn:hover {
    background-color: #9ac4da;
    color: #fff;
}

.no-match-box {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    font-size: 13px;
    margin-top: 15px;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #888;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f3afc4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}