/**
 * Modals CSS - حذف، تعديل، إبلاغ
 * Delete, Edit, Report Modals Styling
 */

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 350px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.notification-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.notification-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Post Options Modal */
.post-options-modal,
.story-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.post-options-modal.show,
.story-options-modal.show {
    opacity: 1;
    pointer-events: all;
}

.post-options-overlay,
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.post-options-content,
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--background-color, #1e1e2e);
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.post-options-modal.show .post-options-content,
.story-options-modal.show .modal-content,
.edit-post-modal.show .modal-content,
.edit-story-modal.show .modal-content,
.report-post-modal.show .modal-content,
.report-story-modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.post-options-header,
.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-options-header h3,
.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color, white);
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-color, white);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.post-options-list,
.options-list {
    padding: 10px 0;
}

.post-option-btn,
.option-btn {
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: none;
    color: var(--text-color, white);
    font-size: 16px;
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
}

.post-option-btn:hover,
.option-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.post-option-btn.edit-btn,
.option-btn.edit-btn {
    color: #667eea;
}

.post-option-btn.delete-btn,
.option-btn.delete-btn {
    color: #ff4757;
}

.post-option-btn.report-btn,
.option-btn.report-btn {
    color: #ffa502;
}

.post-option-btn svg,
.option-btn svg {
    flex-shrink: 0;
}

/* Edit Modal */
.edit-post-modal,
.edit-story-modal,
.report-post-modal,
.report-story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.edit-post-modal.show,
.edit-story-modal.show,
.report-post-modal.show,
.report-story-modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, white);
}

.form-group textarea,
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color, white);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group select option {
    background: #1e1e2e;
    color: white;
}

.char-counter {
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: left;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-save,
.btn-report {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color, white);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-report {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
    color: white;
}

.btn-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 2, 0.4);
}

/* Light Theme Support */
[data-theme="light"] .post-options-content,
[data-theme="light"] .modal-content {
    background: white;
}

[data-theme="light"] .post-options-header h3,
[data-theme="light"] .modal-header h3,
[data-theme="light"] .close-btn,
[data-theme="light"] .post-option-btn,
[data-theme="light"] .option-btn,
[data-theme="light"] .form-group label,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group input[type="text"],
[data-theme="light"] .form-group select {
    color: #333;
}

[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group input[type="text"],
[data-theme="light"] .form-group select {
    background: #f5f5f5;
    border-color: #ddd;
}

[data-theme="light"] .form-group select option {
    background: white;
    color: #333;
}

/* Edit Story/Post Content Styles */
.edit-story-content,
.edit-post-content {
    max-width: 600px !important;
}

.edit-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.edit-user-details h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color, white);
}

.edit-privacy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.story-textarea {
    background: transparent !important;
    border: none !important;
    color: var(--text-color, white);
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    padding: 0 !important;
    font-family: inherit;
}

.story-textarea:focus {
    outline: none;
}

.story-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Media Preview Container */
.media-preview-container {
    position: relative;
    margin: 20px 0;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-preview-img,
.media-preview-video {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    background: black;
}

.remove-media-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.remove-media-btn:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Media Upload Section */
.media-upload-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.media-upload-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color, white);
}

.media-upload-label:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.media-upload-label svg {
    flex-shrink: 0;
    color: #667eea;
}

.media-upload-label span {
    font-size: 15px;
    font-weight: 600;
}

/* Button Enhancements */
.btn-save {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-save svg {
    flex-shrink: 0;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .post-options-content,
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .edit-story-content,
    .edit-post-content {
        max-width: none !important;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .btn-cancel,
    .btn-save,
    .btn-report {
        width: 100%;
    }
    
    .media-preview-img,
    .media-preview-video {
        max-height: 300px;
    }
}


