/* Feed Creator Styles */

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content[data-tab="text"] {
    display: block;
}

/* Rich Text Editor */
.editor-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: #272729;
    border: 1px solid #343536;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.editor-btn {
    background: transparent;
    border: none;
    color: #818384;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: #1a1a1b;
    color: #d7dadc;
}

.editor-btn.active {
    background: #ff4500;
    color: white;
}

.editor-separator {
    width: 1px;
    height: 20px;
    background: #343536;
    margin: 0 4px;
}

.editor-wrapper {
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: #1a1a1b;
    border: 1px solid #343536;
    border-radius: 0 0 4px 4px;
    color: #d7dadc;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
}

.editor-wrapper:empty:not(.focused):before {
    content: attr(data-placeholder);
    color: #818384;
    pointer-events: none;
}

.editor-wrapper:focus {
    border-color: #d7dadc;
}

.editor-wrapper blockquote {
    border-left: 4px solid #ff4500;
    padding-left: 16px;
    margin: 8px 0;
    color: #818384;
}

.editor-wrapper pre {
    background: #272729;
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    overflow-x: auto;
}

.editor-wrapper h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 8px 0;
}

.editor-wrapper ul,
.editor-wrapper ol {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Tags */
.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #272729;
    color: #ff4500;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.tag-item .remove-tag {
    background: transparent;
    border: none;
    color: #818384;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.tag-item .remove-tag:hover {
    color: #ff4500;
}

/* Media Upload */
.media-upload-area {
    margin-top: 16px;
}

.upload-zone {
    border: 2px dashed #343536;
    border-radius: 4px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #ff4500;
    background: rgba(255, 69, 0, 0.05);
}

.upload-zone i {
    font-size: 48px;
    color: #818384;
    margin-bottom: 16px;
}

.upload-zone p {
    color: #d7dadc;
    margin-bottom: 8px;
}

.upload-info {
    font-size: 12px;
    color: #818384;
}

.media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.preview-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #272729;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.preview-item .remove-media {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item .remove-media:hover {
    background: #ff4500;
}

/* Link Preview */
.link-preview {
    margin-top: 12px;
}

.link-preview-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #272729;
    border: 1px solid #343536;
    border-radius: 4px;
}

.link-preview-image {
    width: 80px;
    height: 80px;
    background: #1a1a1b;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-preview-image i {
    font-size: 24px;
    color: #818384;
}

.link-preview-content h4 {
    color: #d7dadc;
    font-size: 14px;
    margin-bottom: 4px;
}

.link-preview-content p {
    color: #818384;
    font-size: 12px;
}

/* Poll Options */
.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-option-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.poll-option-input {
    flex: 1;
    background: #1a1a1b;
    border: 1px solid #343536;
    color: #d7dadc;
    padding: 8px 12px;
    border-radius: 4px;
}

.remove-option {
    background: transparent;
    border: 1px solid #343536;
    color: #818384;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-option:hover {
    background: #ff4500;
    border-color: #ff4500;
    color: white;
}

.add-option-btn {
    background: transparent;
    border: 1px solid #343536;
    color: #818384;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.add-option-btn:hover {
    border-color: #ff4500;
    color: #ff4500;
}

.poll-settings {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d7dadc;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff4500;
}

.form-group label {
    display: block;
    color: #818384;
    font-size: 12px;
    margin-bottom: 8px;
}

#poll-end-date {
    background: #1a1a1b;
    border: 1px solid #343536;
    color: #d7dadc;
    padding: 8px 12px;
    border-radius: 4px;
    width: 100%;
}

/* Modal Updates */
.modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-body {
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .editor-tools {
        flex-wrap: wrap;
    }

    .media-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .preview-item img,
    .preview-item video {
        height: 100px;
    }

    .link-preview-card {
        flex-direction: column;
    }

    .link-preview-image {
        width: 100%;
        height: 120px;
    }
}