/* استایل‌های اختصاصی صفحه مدیریت اسلایدر */

.upload-section {
    margin-bottom: 25px;
    text-align: center;
}

.upload-slide-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.upload-slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.upload-progress {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.upload-progress-item {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.upload-progress-item:last-child {
    margin-bottom: 0;
}

.progress-file-name {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    word-break: break-word;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-file-size {
    font-size: 12px;
    color: #6c757d;
    margin-right: 8px;
}

.progress-bar-container {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-status {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-status i {
    font-size: 14px;
}

.save-section {
    margin-top: 30px;
    text-align: center;
}

.save-slider-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.save-slider-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.save-slider-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* لیست اسلایدها */
#slides-list-container {
    min-height: 200px;
}

.slides-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.slide-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.slide-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slide-order-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slide-order-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-order-btn:hover {
    background: #138496;
    transform: scale(1.05);
}

.slide-order-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
}

.slide-preview {
    width: 200px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.slide-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-info {
    flex: 1;
    min-width: 0;
}

.slide-link-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #6c757d;
}

.slide-link-info i {
    font-size: 16px;
}

.slide-link-info.has-link {
    color: #28a745;
}

.slide-link-info.has-link i {
    color: #28a745;
}

.slide-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slide-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slide-action-btn.edit {
    background: #17a2b8;
    color: white;
}

.slide-action-btn.edit:hover {
    background: #138496;
}

.slide-action-btn.delete {
    background: #dc3545;
    color: white;
}

.slide-action-btn.delete:hover {
    background: #c82333;
}

/* Modal */
.edit-slide-modal {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #dc3545;
}

.edit-preview {
    margin-bottom: 20px;
    max-height: 300px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.edit-preview img {
    max-width: 100%;
    display: block;
}

.link-section {
    margin-top: 15px;
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 10px;
    background: white;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item.selected {
    background: #e7f3ff;
    border-left: 4px solid #17a2b8;
}

.selected-item {
    margin-top: 10px;
    padding: 12px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-item .remove-selection {
    background: none;
    border: none;
    color: #721c24;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions .action-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn.save {
    background: #28a745;
    color: white;
}

.action-btn.save:hover {
    background: #218838;
}

.action-btn.cancel {
    background: #6c757d;
    color: white;
}

.action-btn.cancel:hover {
    background: #5a6268;
}

/* Loading spinner */
.search-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.search-loading i {
    font-size: 24px;
}

/* Loading state برای لیست اسلایدها */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.spinner-loader {
    width: 50px;
    height: 50px;
    border: 5px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* استایل فیلد لینک خارجی */
#external-link {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    margin-top: 10px;
}

#external-link:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#external-link:hover {
    border-color: #adb5bd;
}

/* Responsive */
@media (max-width: 768px) {
    .slide-item {
        flex-direction: column;
        gap: 15px;
    }

    .slide-preview {
        width: 100%;
        height: 200px;
    }

    .slide-actions {
        flex-direction: row;
        width: 100%;
    }

    .slide-action-btn {
        flex: 1;
    }
}

