/**
 * Summernote Grid Plugin - Styles
 * Editor & Frontend CSS
 */

/* ========== Editor (Admin) Styles ========== */
.note-editable .sn-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 10px 0;
    padding: 2px;
    border: 2px dashed #d0d5dd;
    border-radius: 6px;
    min-height: 50px;
    position: relative;
}

.note-editable .sn-grid-col {
    border: 1px dotted #b0b8c4;
    min-height: 40px;
    padding: 8px;
    outline: none;
    border-radius: 4px;
    transition: border-color .15s, box-shadow .15s;
}

.note-editable .sn-grid-col:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, .15);
}

.note-editable .sn-grid-col iframe,
.note-editable .sn-grid-col video {
    max-width: 100% !important;
    width: 100% !important;
    aspect-ratio: 16/9;
}

.note-editable .sn-grid-col img {
    max-width: 100%;
    height: auto;
}

.sn-grid-delete {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.sn-grid-delete:hover {
    background: #bb2d3b;
}

/* ========== Frontend Styles ========== */
.sn-grid {
    display: flex;
    flex-wrap: wrap;
}

.sn-grid-col iframe,
.sn-grid-col video {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
}

.sn-grid-col img {
    max-width: 100%;
    height: auto;
}

/* ========== Responsive ========== */
@media (max-width: 767.98px) {
    .sn-grid {
        flex-direction: column;
    }
    .sn-grid-col {
        width: 100% !important;
        flex: none !important;
    }
}
