/**
 * Hyper Water - Universal Rich Editor & Media Embeds Styling
 * شركة هايبر ووتر لتكنولوجيا ومعالجة المياه
 */

.hyper-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.editor-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    color: #1d1d1f;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}
.editor-btn:hover {
    background: #f5f5f7;
    border-color: #0071e3;
    color: #0071e3;
}
.editor-btn:active {
    transform: scale(0.96);
}

.editor-btn-pill {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    color: #1d1d1f;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}
.editor-btn-pill:hover {
    background: #f5f5f7;
    border-color: #0071e3;
}
.editor-btn-pill:active {
    transform: scale(0.97);
}

.editor-btn-accent {
    background: #e8f2fe !important;
    border-color: #0071e3 !important;
    color: #0071e3 !important;
}
.editor-btn-accent:hover {
    background: #0071e3 !important;
    color: #ffffff !important;
}
.editor-btn-accent:hover i {
    color: #ffffff !important;
}

.palette-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 10px;
    z-index: 1000;
    min-width: 140px;
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #86868b;
    transition: transform 0.12s ease;
}
.color-swatch:hover {
    transform: scale(1.15);
}

.editor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.editor-modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 540px;
    overflow: hidden;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.editor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.4rem;
    border-bottom: 1px solid #f2f2f7;
}
.editor-modal-header h4 {
    margin: 0;
    font-size: 1.05rem;
    color: #1d1d1f;
    font-weight: 700;
}
.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #86868b;
    cursor: pointer;
}
.close-modal-btn:hover {
    color: #1d1d1f;
}
.editor-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.9rem 1.4rem;
    border-top: 1px solid #f2f2f7;
    background: #fafafa;
}

.modal-selectable-item {
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #e5e5ea;
    background: #ffffff;
    transition: all 0.15s ease;
}
.modal-selectable-item:hover {
    background: #f5f5f7;
    border-color: #0071e3;
}

.seo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6e6e73;
    font-size: 0.82rem;
    line-height: 1.4;
}
.seo-item.passed {
    color: #065f46;
}
.seo-item.passed .item-icon {
    color: #10b981;
}
.seo-item.failed .item-icon {
    color: #ef4444;
}

@media (max-width: 900px) {
    .seo-split-grid {
        grid-template-columns: 1fr !important;
    }
}
