/* 
 * فایل: assets/css/new-image-viewer.css
 * استایل صفحه نمایش تصویر - مطابق طراحی سایت Ideogram
 */

body {
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', sans-serif;
}

/* سبک کلی صفحه */
.image-viewer-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* باکس جستجو در بالای صفحه */
.image-viewer-header {
    position: fixed;
    top: 70px; /* فاصله از نوار منو اصلی */
    left: 0;
    right: 0;
    z-index: 100;
    padding: 15px;
    display: flex;
    justify-content: center;
}

.viewer-search-box {
    display: flex;
    width: 100%;
    max-width: 700px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.viewer-search-box input {
    flex: 1;
    padding: 12px 15px;
    background-color: #111;
    border: 1px solid #333;
    border-radius: 10px 0 0 10px;
    color: #fff;
    font-size: 14px;
}

.viewer-search-box button {
    background-color: #4f6ef7;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    font-weight: bold;
}

/* محفظه اصلی نمایش تصویر */
.image-viewer-main {
    flex: 1;
    display: flex;
    padding-top: 130px; /* برای فضای هدر */
}

.image-view {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    padding: 0;
    position: relative;
}

.image-view img {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    display: block;
    margin: 0 auto;
}

/* دکمه پرامپت به صورت مجزا در گوشه چپ پایین */
.prompt-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(79, 110, 247, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.prompt-btn i {
    margin-right: 6px;
}

.prompt-btn:hover {
    background-color: rgba(79, 110, 247, 1);
    transform: translateY(-2px);
}

/* پنل پرامپت */
.prompt-section {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 350px;
    background-color: rgba(30, 30, 30, 0.95);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    z-index: 101;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    max-height: 60vh;
    overflow-y: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    color: #4f6ef7;
}

.close-section {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-section:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.prompt-text {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 14px;
    border: 1px solid #333;
    direction: ltr;
    text-align: left;
    font-family: 'Vazirmatn', monospace;
}

.use-prompt-btn {
    width: 100%;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4f6ef7;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.use-prompt-btn i {
    margin-left: 8px;
}

.use-prompt-btn:hover {
    background-color: #3a5be0;
    transform: translateY(-2px);
}

/* دکمه‌های کنترلی در بالای تصویر */
.image-controls {
    position: fixed;
    top: 130px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid #444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.control-btn:hover {
    background-color: rgba(79, 110, 247, 0.7);
    transform: scale(1.1);
}

/* نمایش نوتیفیکیشن */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(79, 110, 247, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
}

/* اطلاعات تصویر در گوشه راست */
.image-info {
    position: fixed;
    top: 130px;
    right: 80px;
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 15px;
    min-width: 200px;
    display: none;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-label {
    color: #999;
    font-size: 13px;
}

.info-value {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

/* استایل مودال اشتراک‌گذاری */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #171717;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.close-modal {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

/* طراحی واکنش‌گرا */
@media (max-width: 992px) {
    .image-view img {
        max-width: 100%;
        max-height: calc(100vh - 200px);
    }
    
    .prompt-section {
        width: 300px;
        bottom: 70px;
    }
}

@media (max-width: 768px) {
    .image-view img {
        max-height: calc(100vh - 220px);
    }
    
    .prompt-section {
        width: calc(100% - 60px);
        left: 20px;
        right: 20px;
    }
    
    .image-controls {
        top: auto;
        bottom: 20px;
        right: 20px;
        flex-direction: row;
    }
}
