/* Composer Styles */
.scdev-sb-v2-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--scdev-border, #e2e8f0);
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 14px;
    resize: none;
    box-sizing: border-box;
    background: var(--scdev-bg-secondary, #f8fafc);
    color: var(--scdev-text-primary, #0f172a);
    transition: all 0.2s ease;
}

.scdev-sb-v2-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.scdev-sb-v2-textarea::placeholder {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #94a3b8;
}

.scdev-sb-v2-char-count {
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: var(--scdev-text-muted, #94a3b8);
    text-align: right;
    margin-top: 4px;
}

/* Night / Dark mode for textarea */
body.night-mode .scdev-sb-v2-textarea,
body.dark-mode .scdev-sb-v2-textarea,
body.sheer-dark .scdev-sb-v2-textarea,
body.sheer-dark-mode .scdev-sb-v2-textarea,
body.wp-dark-mode-active .scdev-sb-v2-textarea,
html.dark .scdev-sb-v2-textarea,
[data-theme="dark"] .scdev-sb-v2-textarea,
[data-color-scheme="dark"] .scdev-sb-v2-textarea {
    background: #12131a !important;
    color: #f8fafc !important;
    border-color: #2e3146 !important;
}

body.night-mode .scdev-sb-v2-textarea::placeholder,
body.dark-mode .scdev-sb-v2-textarea::placeholder,
body.sheer-dark .scdev-sb-v2-textarea::placeholder,
body.sheer-dark-mode .scdev-sb-v2-textarea::placeholder,
body.wp-dark-mode-active .scdev-sb-v2-textarea::placeholder,
html.dark .scdev-sb-v2-textarea::placeholder,
[data-theme="dark"] .scdev-sb-v2-textarea::placeholder,
[data-color-scheme="dark"] .scdev-sb-v2-textarea::placeholder {
    color: #94a3b8 !important;
}

body.night-mode .scdev-sb-v2-char-count,
body.dark-mode .scdev-sb-v2-char-count,
body.sheer-dark .scdev-sb-v2-char-count,
body.sheer-dark-mode .scdev-sb-v2-char-count,
body.wp-dark-mode-active .scdev-sb-v2-char-count,
html.dark .scdev-sb-v2-char-count,
[data-theme="dark"] .scdev-sb-v2-char-count,
[data-color-scheme="dark"] .scdev-sb-v2-char-count {
    color: #94a3b8 !important;
}

/* Media Actions */
.scdev-sb-v2-media-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 6px 0 4px 0;
}

.scdev-sb-v2-media-btn {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    font-size: 24px !important;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    padding: 4px 10px;
    line-height: 1;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.scdev-sb-v2-media-btn:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, 0.07) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

.scdev-sb-v2-media-btn:active {
    transform: scale(0.95);
}

body.night-mode .scdev-sb-v2-media-btn,
body.dark-mode .scdev-sb-v2-media-btn,
body.sheer-dark .scdev-sb-v2-media-btn,
body.sheer-dark-mode .scdev-sb-v2-media-btn,
body.wp-dark-mode-active .scdev-sb-v2-media-btn,
html.dark .scdev-sb-v2-media-btn,
[data-theme="dark"] .scdev-sb-v2-media-btn,
[data-color-scheme="dark"] .scdev-sb-v2-media-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.night-mode .scdev-sb-v2-media-btn:hover,
body.dark-mode .scdev-sb-v2-media-btn:hover,
body.sheer-dark .scdev-sb-v2-media-btn:hover,
body.sheer-dark-mode .scdev-sb-v2-media-btn:hover,
body.wp-dark-mode-active .scdev-sb-v2-media-btn:hover,
html.dark .scdev-sb-v2-media-btn:hover,
[data-theme="dark"] .scdev-sb-v2-media-btn:hover,
[data-color-scheme="dark"] .scdev-sb-v2-media-btn:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Image Gallery */
.scdev-sb-v2-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 2px;
    margin-bottom: 8px;
}

.scdev-sb-v2-image-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

body.night-mode .scdev-sb-v2-image-item,
body.dark-mode .scdev-sb-v2-image-item,
body.sheer-dark .scdev-sb-v2-image-item,
body.sheer-dark-mode .scdev-sb-v2-image-item,
html.dark .scdev-sb-v2-image-item,
[data-theme="dark"] .scdev-sb-v2-image-item {
    background: rgba(255, 255, 255, 0.08) !important;
}

.scdev-sb-v2-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scdev-sb-v2-remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scdev-sb-v2-remove-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Video Section */
.scdev-sb-v2-video-section {
    margin-bottom: 8px;
}

.scdev-sb-v2-video-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    box-sizing: border-box;
    background: #ffffff;
    color: #000000;
}

.scdev-sb-v2-video-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body.night-mode .scdev-sb-v2-video-input,
body.dark-mode .scdev-sb-v2-video-input,
body.sheer-dark .scdev-sb-v2-video-input,
body.sheer-dark-mode .scdev-sb-v2-video-input,
body.wp-dark-mode-active .scdev-sb-v2-video-input,
html.dark .scdev-sb-v2-video-input,
[data-theme="dark"] .scdev-sb-v2-video-input,
[data-color-scheme="dark"] .scdev-sb-v2-video-input {
    background: #12131a !important;
    color: #f8fafc !important;
    border-color: #2e3146 !important;
}

/* File Preview */
.scdev-sb-v2-file-preview {
    display: flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f5f5f5;
    margin-bottom: 8px;
    align-items: center;
}

.scdev-sb-v2-file-name {
    flex: 1;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #000000;
}

body.night-mode .scdev-sb-v2-file-preview,
body.dark-mode .scdev-sb-v2-file-preview,
body.sheer-dark .scdev-sb-v2-file-preview,
body.sheer-dark-mode .scdev-sb-v2-file-preview,
body.wp-dark-mode-active .scdev-sb-v2-file-preview,
html.dark .scdev-sb-v2-file-preview,
[data-theme="dark"] .scdev-sb-v2-file-preview,
[data-color-scheme="dark"] .scdev-sb-v2-file-preview {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.night-mode .scdev-sb-v2-file-name,
body.dark-mode .scdev-sb-v2-file-name,
body.sheer-dark .scdev-sb-v2-file-name,
body.sheer-dark-mode .scdev-sb-v2-file-name,
body.wp-dark-mode-active .scdev-sb-v2-file-name,
html.dark .scdev-sb-v2-file-name,
[data-theme="dark"] .scdev-sb-v2-file-name,
[data-color-scheme="dark"] .scdev-sb-v2-file-name {
    color: #f8fafc !important;
}

/* Modal Actions */
.scdev-sb-v2-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 10px 0 0 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
}

body.night-mode .scdev-sb-v2-modal-actions,
body.dark-mode .scdev-sb-v2-modal-actions,
body.sheer-dark .scdev-sb-v2-modal-actions,
body.sheer-dark-mode .scdev-sb-v2-modal-actions,
body.wp-dark-mode-active .scdev-sb-v2-modal-actions,
html.dark .scdev-sb-v2-modal-actions,
[data-theme="dark"] .scdev-sb-v2-modal-actions,
[data-color-scheme="dark"] .scdev-sb-v2-modal-actions {
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}

/* Post (Submit) Button - Blue background with white text */
.scdev-sb-v2-submit-btn {
    padding: 8px 22px !important;
    border: 1px solid #1d4ed8 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3) !important;
    line-height: 1.4 !important;
}

.scdev-sb-v2-submit-btn:hover {
    background: #1d4ed8 !important;
    border-color: #1e40af !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.scdev-sb-v2-submit-btn:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    background: #2563eb !important;
    color: #ffffff !important;
    transform: none !important;
}

/* Night / Dark mode for Post button */
body.night-mode .scdev-sb-v2-submit-btn,
body.dark-mode .scdev-sb-v2-submit-btn,
body.sheer-dark .scdev-sb-v2-submit-btn,
body.sheer-dark-mode .scdev-sb-v2-submit-btn,
body.wp-dark-mode-active .scdev-sb-v2-submit-btn,
html.dark .scdev-sb-v2-submit-btn,
[data-theme="dark"] .scdev-sb-v2-submit-btn,
[data-color-scheme="dark"] .scdev-sb-v2-submit-btn {
    background: #2563eb !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
}

body.night-mode .scdev-sb-v2-submit-btn:hover,
body.dark-mode .scdev-sb-v2-submit-btn:hover,
body.sheer-dark .scdev-sb-v2-submit-btn:hover,
body.sheer-dark-mode .scdev-sb-v2-submit-btn:hover,
body.wp-dark-mode-active .scdev-sb-v2-submit-btn:hover,
html.dark .scdev-sb-v2-submit-btn:hover,
[data-theme="dark"] .scdev-sb-v2-submit-btn:hover,
[data-color-scheme="dark"] .scdev-sb-v2-submit-btn:hover {
    background: #1d4ed8 !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* Cancel Button */
.scdev-sb-v2-cancel-btn {
    padding: 8px 18px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: #f8fafc !important;
    color: #334155 !important;
    line-height: 1.4 !important;
}

.scdev-sb-v2-cancel-btn:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Night / Dark mode for Cancel button */
body.night-mode .scdev-sb-v2-cancel-btn,
body.dark-mode .scdev-sb-v2-cancel-btn,
body.sheer-dark .scdev-sb-v2-cancel-btn,
body.sheer-dark-mode .scdev-sb-v2-cancel-btn,
body.wp-dark-mode-active .scdev-sb-v2-cancel-btn,
html.dark .scdev-sb-v2-cancel-btn,
[data-theme="dark"] .scdev-sb-v2-cancel-btn,
[data-color-scheme="dark"] .scdev-sb-v2-cancel-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f8fafc !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
}

body.night-mode .scdev-sb-v2-cancel-btn:hover,
body.dark-mode .scdev-sb-v2-cancel-btn:hover,
body.sheer-dark .scdev-sb-v2-cancel-btn:hover,
body.sheer-dark-mode .scdev-sb-v2-cancel-btn:hover,
body.wp-dark-mode-active .scdev-sb-v2-cancel-btn:hover,
html.dark .scdev-sb-v2-cancel-btn:hover,
[data-theme="dark"] .scdev-sb-v2-cancel-btn:hover,
[data-color-scheme="dark"] .scdev-sb-v2-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Privacy Toggle Button */
.scdev-sb-v2-privacy-toggle {
    padding: 8px 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    line-height: 1.4 !important;
}

.scdev-sb-v2-privacy-toggle:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Night / Dark mode for Privacy toggle button */
body.night-mode .scdev-sb-v2-privacy-toggle,
body.dark-mode .scdev-sb-v2-privacy-toggle,
body.sheer-dark .scdev-sb-v2-privacy-toggle,
body.sheer-dark-mode .scdev-sb-v2-privacy-toggle,
body.wp-dark-mode-active .scdev-sb-v2-privacy-toggle,
html.dark .scdev-sb-v2-privacy-toggle,
[data-theme="dark"] .scdev-sb-v2-privacy-toggle,
[data-color-scheme="dark"] .scdev-sb-v2-privacy-toggle {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f8fafc !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
}

body.night-mode .scdev-sb-v2-privacy-toggle:hover,
body.dark-mode .scdev-sb-v2-privacy-toggle:hover,
body.sheer-dark .scdev-sb-v2-privacy-toggle:hover,
body.sheer-dark-mode .scdev-sb-v2-privacy-toggle:hover,
body.wp-dark-mode-active .scdev-sb-v2-privacy-toggle:hover,
html.dark .scdev-sb-v2-privacy-toggle:hover,
[data-theme="dark"] .scdev-sb-v2-privacy-toggle:hover,
[data-color-scheme="dark"] .scdev-sb-v2-privacy-toggle:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Message */
.scdev-sb-v2-message {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    text-align: center;
    margin-top: 6px;
}

.scdev-sb-v2-message.error {
    background: #ffebee;
    color: #c62828;
}

.scdev-sb-v2-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Emoji Picker */
.scdev-sb-v2-emoji-wrapper {
    position: relative;
}

.scdev-sb-v2-emoji-picker {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 4px;
    display: none;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.scdev-sb-v2-emoji-picker:not(.scdev-hidden) {
    display: grid;
}

.scdev-sb-v2-emoji {
    background: transparent !important;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: background 0.2s;
    line-height: 1;
}

.scdev-sb-v2-emoji:hover {
    background: #f5f5f5 !important;
}

body.night-mode .scdev-sb-v2-emoji-picker,
body.dark-mode .scdev-sb-v2-emoji-picker,
body.sheer-dark .scdev-sb-v2-emoji-picker,
body.sheer-dark-mode .scdev-sb-v2-emoji-picker,
body.wp-dark-mode-active .scdev-sb-v2-emoji-picker,
html.dark .scdev-sb-v2-emoji-picker,
[data-theme="dark"] .scdev-sb-v2-emoji-picker,
[data-color-scheme="dark"] .scdev-sb-v2-emoji-picker {
    background: #1e1f2b !important;
    border-color: #2e3146 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

/* Link Preview Temporary in Modal */
.scdev-sb-v2-link-preview-temp {
    margin-top: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

.scdev-sb-v2-remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}

.scdev-sb-v2-remove-preview:hover {
    background: rgba(0, 0, 0, 0.9);
}

body.night-mode .scdev-sb-v2-link-preview-temp,
body.dark-mode .scdev-sb-v2-link-preview-temp,
body.sheer-dark .scdev-sb-v2-link-preview-temp,
body.sheer-dark-mode .scdev-sb-v2-link-preview-temp,
body.wp-dark-mode-active .scdev-sb-v2-link-preview-temp,
html.dark .scdev-sb-v2-link-preview-temp,
[data-theme="dark"] .scdev-sb-v2-link-preview-temp,
[data-color-scheme="dark"] .scdev-sb-v2-link-preview-temp {
    background: #1e1f2b !important;
    border-color: #2e3146 !important;
}
