/* Quill Editor Özel Stilleri */

/* Quill Header Dropdown Labels */
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
    content: 'Heading 2' !important;
}


.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
    content: 'Heading 3' !important;
}

.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
    content: 'Başlık' !important;
}

.ql-snow .ql-picker.ql-header .ql-picker-label:not([data-value])::before,
.ql-snow .ql-picker.ql-header .ql-picker-item:not([data-value])::before {
    content: 'Normal' !important;
}

/* Editor Headings Style Matches Frontend */
.ql-editor h4 {
    font-size: 1.75rem;
    font-weight: 400;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Toolbar Alert Button */
.ql-toolbar .ql-alert::before {
    content: '⚠';
    font-size: 1.2rem;
}

.ql-toolbar button.ql-alert {
    width: 28px;
}



/* Alert/Kart Bileşenleri */
.alert-box {
    position: relative;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    border-left: 4px solid;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.alert-box.alert-info {
    background: #f0f7ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.alert-box.alert-warning {
    background: #fffbf0;
    border-left-color: #f59e0b;
    color: #92400e;
}

.alert-box.alert-danger {
    background: #fff5f5;
    border-left-color: #ef4444;
    color: #991b1b;
}

.alert-box.alert-success {
    background: #f0fdf4;
    border-left-color: #10b981;
    color: #065f46;
}

.alert-icon-col {
    flex: 0 0 auto;
    font-size: 1.4rem;
    line-height: 1;
    padding-top: 0.1rem;
    -webkit-user-select: none;
    user-select: none;
}

.alert-content {
    flex: 1;
    min-width: 0;
    outline: none;
    -webkit-user-modify: read-write;
    -moz-user-modify: read-write;
    user-modify: read-write;
}

.alert-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    line-height: 1.4;
}

.alert-body {
    line-height: 1.6;
    margin: 0;
    color: inherit;
    opacity: 0.9;
}

.alert-content p {
    margin: 0;
    line-height: 1.6;
    color: inherit;
    opacity: 0.9;
}

.alert-content p:last-child {
    margin-bottom: 0;
}

/* Editor içinde alert içeriğine yazılabilir olmalı */
.ql-editor .alert-box .alert-content {
    outline: none;
}

.ql-editor .alert-box .alert-content:focus {
    outline: 2px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Alert içeriğinde formatlama stilleri */
.alert-content strong,
.alert-content b {
    font-weight: 700;
}

.alert-content em,
.alert-content i {
    font-style: italic;
}

.alert-content u {
    text-decoration: underline;
}

.alert-content s,
.alert-content strike {
    text-decoration: line-through;
}

.alert-content h1,
.alert-content h2,
.alert-content h3 {
    font-weight: 700;
    margin: 0.5rem 0;
}

.alert-content h1 {
    font-size: 1.5rem;
}

.alert-content h2 {
    font-size: 1.25rem;
}

.alert-content h3 {
    font-size: 1.1rem;
}

/* Video Wrapper */
.ql-video-wrapper {
    position: relative;
    margin: 1.5rem 0;
    max-width: 100%;
    display: block;
}

.ql-video-wrapper iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
}

.video-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    cursor: nwse-resize;
    border-radius: 4px 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.ql-video-wrapper:hover .video-resize-handle {
    opacity: 1;
}

/* Resizable Image */
.ql-image-resizable {
    display: inline-block;
    position: relative;
}

.ql-image-resizable img {
    display: block;
    max-width: 100%;
}

.image-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    cursor: nwse-resize;
    border-radius: 4px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.ql-image-resizable:hover .image-resize-handle {
    opacity: 1;
}
