/* Ghost Editor Clone Styles - Blocks */
/* This file contains block content styles used in both editor and blog */

/* Editor Pane */
.go-contents-body {
    min-height: 400px;
    position: relative;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.go-contents-body p {
    margin: 4px 0 16px 0;
    word-break: break-word;
}

/* Content links */
.go-contents-body a {
    color: #2276e3;
    text-decoration: none;
}

.go-contents-body a:hover {
    text-decoration: underline;
}

/* Callout */
.go-block-callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px 20px !important;
    margin: 16px 0;
    position: relative;
    cursor: text;
}

.go-callout-icon {
    flex-shrink: 0;
    font-size: 18px;
    padding-top: 6px;
    line-height: 1;
    font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Twemoji Mozilla","EmojiOne Color","Segoe UI Symbol",sans-serif;
}

.go-callout-icon img { width: 18px; height: 18px; display: inline-block; }

.go-callout-body {
    flex: 1;
    min-width: 1px;
    min-height: 24px;
    cursor: text;
}

.go-callout-title {
    margin: 0 0 6px 0;
}

.go-callout-body p {
    position: relative;
}

.go-callout-body p[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: #c5d2de;
    pointer-events: none;
}

.go-callout-body p[data-placeholder]:not(:focus):empty:before {
    content: attr(data-placeholder);
    color: #c5d2de;
    pointer-events: none;
}

.go-callout-body p {
    margin: 4px 0;
    color: #333;
}

/* Block: Paragraph */
.go-block-paragraph {
    font-size: 18px;
    line-height: 1.6;
    color: #15171a;
    outline: none;
    margin: 0;
    cursor: text;
}

/* Text Alignment */
.go-block-paragraph.text-left,
.go-block-heading.text-left,
.go-block-quote.text-left {
    text-align: left;
}

.go-block-paragraph.text-center,
.go-block-heading.text-center,
.go-block-quote.text-center {
    text-align: center;
}

.go-block-paragraph.text-right,
.go-block-heading.text-right,
.go-block-quote.text-right {
    text-align: right;
}

/* Block: Heading */
.go-block-heading {
    font-weight: 700;
    line-height: 1.25;
    color: #15171a;
    outline: none;
    cursor: text;
    position: relative;
}

.go-block-heading[data-level="1"] {
    font-size: 36px;
}

.go-block-heading[data-level="2"] {
    font-size: 28px;
}

.go-block-heading[data-level="3"] {
    font-size: 24px;
}

/* Heading Level Labels */
.go-block-heading[data-level="1"]::after {
    content: 'H1';
    position: absolute;
    left: -44px;
    top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #626d79;
    background: #f4f5f6;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
}

.go-block-heading[data-level="2"]::after {
    content: 'H2';
    position: absolute;
    left: -44px;
    top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #626d79;
    background: #f4f5f6;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
}

.go-block-heading[data-level="3"]::after {
    content: 'H3';
    position: absolute;
    left: -44px;
    top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #626d79;
    background: #f4f5f6;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
}

.go-block-heading:empty:before {
    content: 'Heading';
    color: #c5d2de;
    pointer-events: none;
}

/* Block: List */
.go-block-list {
    font-size: 18px;
    line-height: 1.6;
    padding-left: 24px;
}

.go-block-list ul {
    list-style-type: disc;
}

.go-block-list ol {
    list-style-type: decimal;
    margin: 4px 0 16px;
}

.go-block-list li {
    margin: 8px 0;
    outline: none;
    cursor: text;
}

/* List Alignment */
.go-block-list ul.text-left,
.go-block-list ol.text-left {
    text-align: left;
}

.go-block-list ul.text-center,
.go-block-list ol.text-center {
    text-align: center;
}

.go-block-list ul.text-right,
.go-block-list ol.text-right {
    text-align: right;
}

/* Block: Quote */
.go-block-quote {
    border-left: 4px solid #dddddd;
    padding-left: 24px !important;
    font-size: 20px;
    line-height: 1.6;
    font-style: italic;
    color: #15171a;
    outline: none;
    cursor: text;
}

.go-block-quote:empty:before {
    content: 'Quote';
    color: #c5d2de;
    pointer-events: none;
}

/* Block: Code */
.go-block-code {
    background: #15171a;
    border-radius: 4px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #fff;
    outline: none;
    overflow-x: auto;
    cursor: text;
}

.go-block-code:empty:before {
    content: 'Code';
    color: #626d79;
    pointer-events: none;
}

/* Block: HTML */
.go-block-html {
    background: #f4f5f6;
    border: 1px dashed #c5d2de;
    border-radius: 4px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #15171a;
    outline: none;
}

.go-block-html:empty:before {
    content: 'HTML';
    color: #c5d2de;
    pointer-events: none;
}

/* Block: Divider */
.go-block-divider {
    height: 1px;
    min-height: 1px !important;
    background: #dddddd;
    border: none;
    color: #dddddd;
    margin: 32px 0;
}

/* Block: Image */
.go-block-image-container {
    margin: 24px 0;
    transition: all 0.3s ease;
}

/* Image Width Variations */
.go-block-image-container[data-width="regular"] {
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}

.go-block-image-container[data-width="wide"] {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.go-block-image-container[data-width="full"] {
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.go-block-image-preview {
    position: relative;
    border-radius: 8px;
    overflow: visible;
    outline: none;
    transition: box-shadow 0.2s;
}

.go-block-image-preview:focus {
    box-shadow: 0 0 0 3px rgba(48, 207, 67, 0.3);
}

.go-block-image-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.go-block-image-preview figcaption {
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.875rem; /* text-sm equivalent */
    line-height: 1.25rem;
    margin-top: -20px;
    text-align: center;
}

/* General figcaption styles for blog content */
.go-contents-body figcaption,
.blog-content figcaption {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 30px;
}

/* Block: Video */
.go-block-video {
    margin: 24px 0;
}

/* Block: Bookmark */
.go-block-bookmark {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

/* Bookmark Card Styles */
.go-bookmark-card {
    display: flex;
    color: inherit;
    text-decoration: none;
    user-select: none;
    transition: background 20ms ease-in;
    cursor: pointer;
    flex-grow: 1;
    min-width: 0px;
    flex-wrap: wrap-reverse;
    align-items: stretch;
    text-align: start;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    position: relative;
    margin: 24px 0;
}

.go-bookmark-card:hover {
    background: #f9fafb;
}

.go-bookmark-content {
    flex: 4 1 180px;
    padding: 12px 14px 14px;
    overflow: hidden;
    text-align: start;
    min-width: 0;
}

.go-bookmark-title {
    font-size: 14px;
    line-height: 20px;
    color: #15171a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 24px;
    margin-bottom: 2px;
    font-weight: 500;
}

.go-bookmark-description {
    font-size: 12px;
    line-height: 16px;
    color: #626d79;
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
}

.go-bookmark-url {
    display: flex;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    line-height: 16px;
    color: #15171a;
}

.go-bookmark-url img {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-inline-end: 6px;
    object-fit: cover;
}

.go-bookmark-url span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.go-bookmark-image-wrapper {
    flex: 1 1 180px;
    display: block;
    position: relative;
    min-height: 120px;
}

.go-bookmark-image {
    position: absolute;
    top: 0px;
    inset-inline: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

/* Block: Gallery */
.go-block-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.go-block-gallery-item {
    aspect-ratio: 1;
    border: 2px dashed #c5d2de;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.go-block-gallery-item:hover {
    border-color: #15171a;
    background: #f4f5f6;
}

.go-block-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* Checkbox List */
.go-block-list.go-checkbox-list {
    list-style: none;
    padding-left: 0;
}

.go-block-list.go-checkbox-list ul {
    list-style: none;
    padding-left: 0;
}

.go-block-list.go-checkbox-list li {
    position: relative;
    padding-left: 32px;
    list-style: none;
    margin-bottom: 8px;
}

.go-block-list.go-checkbox-list input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.go-block-list.go-checkbox-list .go-checkbox-text {
    display: inline-block;
    outline: none;
    min-width: 1px;
}

.go-block-list.go-checkbox-list .go-checkbox-text:focus {
    outline: none;
}

.go-block-list.go-checkbox-list .go-checkbox-text:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
}

/* Table Block */
.go-block-table {
    width: 100%;
    overflow-x: auto;
    margin: 16px 0;
}

.go-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.go-block-table th,
.go-block-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
    min-width: 100px;
}

.go-block-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #15171a;
}

.go-block-table td {
    background: white;
    color: #15171a;
}

.go-block-table th[contenteditable="true"]:focus,
.go-block-table td[contenteditable="true"]:focus {
    outline: 2px solid #30cf43;
    outline-offset: -2px;
    background: #f9fafb;
}

.go-block-table .text-left { 
    text-align: left; 
}

.go-block-table .text-center { 
    text-align: center; 
}

.go-block-table .text-right { 
    text-align: right; 
}

/* Button Block */
.go-block-button {
    display: flex;
    flex-direction: column;
    margin: 16px 0;
    margin-bottom: 12px;
}

.go-button-preview-wrapper {
    display: flex;
    width: 100%;
}

.go-block-button[data-alignment="left"] .go-button-preview-wrapper {
    justify-content: flex-start;
}

.go-block-button[data-alignment="center"] .go-button-preview-wrapper {
    justify-content: center;
}

.go-block-button[data-alignment="right"] .go-button-preview-wrapper {
    justify-content: flex-end;
}

.go-button-preview {
    background: #30cf43;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.go-button-preview:hover {
    background: #28b838;
}

.go-button-text {
    outline: none;
    cursor: text;
}

.go-button-text:hover {
    cursor: pointer;
}

.go-button-text:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Button size variations */
.go-block-button[data-size="small"] .go-button-preview {
    padding: 8px 16px;
    font-size: 14px;
}

.go-block-button[data-size="medium"] .go-button-preview {
    padding: 12px 24px;
    font-size: 16px;
}

.go-block-button[data-size="large"] .go-button-preview {
    padding: 16px 32px;
    font-size: 18px;
    width: 100%;
    justify-content: center;
}

/* Mobile-specific paragraph spacing in editor content */
body.mobile-viewport .go-contents-body p {
    margin: 4px 0 14px 0;
}

body.mobile-viewport .go-block-list ol {
    margin: 4px 0 14px;
}

/* Mobile viewport bookmark card */
body.mobile-viewport .go-bookmark-card {
    margin: 4px 0 14px 0;
    flex-direction: column;
}

body.mobile-viewport .go-bookmark-image-wrapper {
    width: 100%;
    height: 180px;
    flex: none;
}




