/* PickleEditor - Custom WYSIWYG Editor Styles */

.pickle-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pickle-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.pickle-editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s;
}

.pickle-editor-btn:hover {
    background: #e9ecef;
}

.pickle-editor-btn.active {
    background: #007bff;
    color: #fff;
}

.pickle-editor-separator {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 4px 6px;
}

.pickle-editor-content {
    padding: 15px;
    min-height: 200px;
    max-height: 600px;
    overflow-y: auto;
    outline: none;
    line-height: 1.6;
    font-size: 15px;
}

.pickle-editor-content:empty:before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
}

.pickle-editor-content:focus {
    outline: none;
}

.pickle-editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.pickle-editor-content blockquote {
    border-left: 4px solid #007bff;
    margin: 10px 0;
    padding: 10px 20px;
    background: #f8f9fa;
    color: #555;
}

.pickle-editor-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.pickle-editor-content code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

.pickle-editor-content a {
    color: #007bff;
    text-decoration: underline;
}

.pickle-editor-content h1, 
.pickle-editor-content h2, 
.pickle-editor-content h3 {
    margin: 15px 0 10px;
    font-weight: 600;
}

.pickle-editor-content ul, 
.pickle-editor-content ol {
    margin: 10px 0;
    padding-left: 25px;
}

.pickle-editor-content hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 20px 0;
}

/* Source view */
.pickle-editor-source {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: none;
    outline: none;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    background: #282c34;
    color: #abb2bf;
}

/* Fullscreen mode */
.pickle-editor-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.pickle-editor-fullscreen .pickle-editor-content {
    max-height: calc(100vh - 60px);
    min-height: calc(100vh - 60px);
}

/* Link Modal */
.pickle-editor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.pickle-editor-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.pickle-editor-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pickle-editor-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.pickle-editor-modal-close:hover {
    color: #333;
}

.pickle-editor-modal-body {
    padding: 20px;
}

.pickle-editor-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.pickle-editor-form-group {
    margin-bottom: 15px;
}

.pickle-editor-form-group:last-child {
    margin-bottom: 0;
}

.pickle-editor-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.pickle-editor-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.pickle-editor-input:focus {
    outline: none;
    border-color: #007bff;
}

.pickle-editor-btn-primary {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.pickle-editor-btn-primary:hover {
    background: #0056b3;
}

.pickle-editor-btn-cancel {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.pickle-editor-btn-cancel:hover {
    background: #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    .pickle-editor-toolbar {
        padding: 6px;
    }
    
    .pickle-editor-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .pickle-editor-content {
        padding: 12px;
        font-size: 14px;
    }
}
