/*--------------------------------------------------------------
# Block Editor Styles
# Ensures backend editor matches frontend styles
--------------------------------------------------------------*/

/* Editor Base Styles */
.editor-styles-wrapper {
    color: #404040;
    font-family: 'PT Serif', serif;
    font-size: 17px;
    line-height: 1.6;
}

.editor-styles-wrapper p {
    color: #404040;
    font-family: 'PT Serif', serif;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 1.5em;
}

/* Headings */
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6,
.editor-post-title__block .editor-post-title__input {
    clear: both;
    font-family: 'Crete Round', serif;
    font-weight: 700;
    margin-top: 0;
    letter-spacing: 1px;
    line-height: 1.3;
}

/* Button Block */
.editor-styles-wrapper .wp-block-button {
    margin-bottom: 1.5em;
}

.editor-styles-wrapper .wp-block-button__link {
    background-color: #0073aa;
    border: none;
    border-radius: 28px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 24px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid currentColor;
    color: #0073aa;
}

.editor-styles-wrapper .wp-block-button.is-style-squared .wp-block-button__link {
    border-radius: 4px;
}

/* Image Block */
.editor-styles-wrapper .wp-block-image {
    margin-bottom: 1.5em;
}

.editor-styles-wrapper .wp-block-image img {
    display: block;
    height: auto;
    max-width: 100%;
}

.editor-styles-wrapper .wp-block-image figcaption {
    color: #666;
    font-size: 14px;
    font-style: italic;
    margin-top: 0.5em;
    text-align: center;
}

/* Gallery Block */
.editor-styles-wrapper .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    list-style-type: none;
    padding: 0;
    margin: 1.5em 0;
}

.editor-styles-wrapper .wp-block-gallery .blocks-gallery-item,
.editor-styles-wrapper .wp-block-gallery .wp-block-image {
    margin: 0 1em 1em 0;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    position: relative;
}
/* Quote Block */
.editor-styles-wrapper .wp-block-quote {
    border-left: 4px solid #0073aa;
    margin: 1.5em 0;
    padding: 1em 0 1em 2em;
}

.editor-styles-wrapper .wp-block-quote p {
    font-size: 1.2em;
    font-style: italic;
    line-height: 1.6;
}

.editor-styles-wrapper .wp-block-quote cite {
    color: #666;
    font-size: 0.9em;
    font-style: normal;
    font-weight: 600;
}

.editor-styles-wrapper .wp-block-quote.is-large,
.editor-styles-wrapper .wp-block-quote.is-style-large {
    border: none;
    padding: 2em;
    text-align: center;
}

.editor-styles-wrapper .wp-block-quote.is-large p,
.editor-styles-wrapper .wp-block-quote.is-style-large p {
    font-size: 1.5em;
    line-height: 1.4;
}

/* Pullquote Block */
.editor-styles-wrapper .wp-block-pullquote {
    border-top: 4px solid #0073aa;
    border-bottom: 4px solid #0073aa;
    margin: 2em 0;
    padding: 2em;
    text-align: center;
}

.editor-styles-wrapper .wp-block-pullquote p {
    font-size: 1.5em;
    line-height: 1.4;
    margin: 0;
}

.editor-styles-wrapper .wp-block-pullquote cite {
    color: #666;
    display: block;
    font-size: 0.9em;
    font-style: normal;
    margin-top: 1em;
    text-transform: uppercase;
}

.editor-styles-wrapper .wp-block-pullquote.is-style-solid-color {
    background-color: #0073aa;
    color: #fff;
}

/* Video and Embed Blocks */
.editor-styles-wrapper .wp-block-video video {
    max-width: 100%;
    height: auto;
}

.editor-styles-wrapper .wp-block-embed {
    margin: 1.5em 0;
}

.editor-styles-wrapper .wp-block-embed figcaption {
    color: #666;
    font-size: 14px;
    margin-top: 0.5em;
    text-align: center;
}

.editor-styles-wrapper .wp-block-embed.type-video > .wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
}

.editor-styles-wrapper .wp-block-embed.type-video > .wp-block-embed__wrapper > iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Table Block */
.editor-styles-wrapper .wp-block-table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
}

.editor-styles-wrapper .wp-block-table table {
    width: 100%;
}

.editor-styles-wrapper .wp-block-table td,
.editor-styles-wrapper .wp-block-table th {
    border: 1px solid #ddd;
    padding: 0.75em;
    text-align: left;
}

.editor-styles-wrapper .wp-block-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}


/* Separator Block */
.editor-styles-wrapper .wp-block-separator {
    border: none;
    border-top: 2px solid #ddd;
    margin: 2em auto;
    width: 100px;
}

.editor-styles-wrapper .wp-block-separator.is-style-wide {
    width: 100%;
}

.editor-styles-wrapper .wp-block-separator.is-style-dots {
    background: none;
    border: none;
    text-align: center;
    max-width: none;
    line-height: 1;
}

.editor-styles-wrapper .wp-block-separator.is-style-dots::before {
    content: "···";
    color: #999;
    font-size: 1.5em;
    letter-spacing: 2em;
    padding-left: 2em;
}

/* Latest Posts Block */
.editor-styles-wrapper .wp-block-latest-posts {
    list-style: none;
    padding: 0;
}

.editor-styles-wrapper .wp-block-latest-posts li {
    margin-bottom: 1em;
}

.editor-styles-wrapper .wp-block-latest-posts.is-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.editor-styles-wrapper .wp-block-latest-posts.is-grid li {
    flex: 1;
    margin: 0 1.25em 1.25em 0;
    min-width: 300px;
}

/* Columns Block */
.editor-styles-wrapper .wp-block-columns {
    display: flex;
    margin: 1.5em 0;
    flex-wrap: wrap;
}

.editor-styles-wrapper .wp-block-column {
    flex: 1;
    margin-bottom: 1.5em;
    margin-right: 2em;
}

.editor-styles-wrapper .wp-block-column:last-child {
    margin-right: 0;
}

/* Code Blocks */
.editor-styles-wrapper .wp-block-code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-family: Menlo, Consolas, monaco, monospace;
    font-size: 14px;
    padding: 1em;
    margin: 1.5em 0;
    overflow-x: auto;
}

.editor-styles-wrapper .wp-block-preformatted {
    background-color: #f8f9fa;
    font-family: Menlo, Consolas, monaco, monospace;
    font-size: 14px;
    padding: 1em;
    margin: 1.5em 0;
    white-space: pre-wrap;
    overflow: auto;
}

.editor-styles-wrapper .wp-block-verse {
    font-family: monospace;
    white-space: pre-wrap;
    overflow: auto;
    background-color: #f8f9fa;
    padding: 1em;
    margin: 1.5em 0;
}

/* Font Sizes */
.editor-styles-wrapper .has-small-font-size {
    font-size: 14px;
}

.editor-styles-wrapper .has-medium-font-size {
    font-size: 18px;
}

.editor-styles-wrapper .has-large-font-size {
    font-size: 24px;
    line-height: 1.4;
}

.editor-styles-wrapper .has-larger-font-size {
    font-size: 32px;
    line-height: 1.3;
}

/* Drop Cap */
.editor-styles-wrapper .wp-block-paragraph.has-drop-cap:not(:focus)::first-letter {
    float: left;
    font-size: 8.4em;
    line-height: 0.68;
    font-weight: 100;
    margin: 0.05em 0.1em 0 0;
    text-transform: uppercase;
    font-style: normal;
}

/* Media & Text Block */
.editor-styles-wrapper .wp-block-media-text {
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-areas: "media-text-media media-text-content";
    grid-gap: 2em;
    margin: 1.5em 0;
    align-items: center;
}

.editor-styles-wrapper .wp-block-media-text.has-media-on-the-right {
    grid-template-areas: "media-text-content media-text-media";
}

.editor-styles-wrapper .wp-block-media-text .wp-block-media-text__media {
    grid-area: media-text-media;
    margin: 0;
}

.editor-styles-wrapper .wp-block-media-text .wp-block-media-text__content {
    grid-area: media-text-content;
    padding: 0;
}

/*--------------------------------------------------------------
# Block Color Palette
--------------------------------------------------------------*/
.editor-styles-wrapper .has-strong-blue-color {
    color: #0073aa;
}

.editor-styles-wrapper .has-strong-blue-background-color {
    background-color: #0073aa;
}

.editor-styles-wrapper .has-lighter-blue-color {
    color: #229fd8;
}

.editor-styles-wrapper .has-lighter-blue-background-color {
    background-color: #229fd8;
}

.editor-styles-wrapper .has-very-light-gray-color {
    color: #eee;
}

.editor-styles-wrapper .has-very-light-gray-background-color {
    background-color: #eee;
}

.editor-styles-wrapper .has-very-dark-gray-color {
    color: #444;
}

.editor-styles-wrapper .has-very-dark-gray-background-color {
    background-color: #444;
}

.editor-styles-wrapper .has-white-color {
    color: #fff;
}

.editor-styles-wrapper .has-white-background-color {
    background-color: #fff;
}

.editor-styles-wrapper .has-black-color {
    color: #000;
}

.editor-styles-wrapper .has-black-background-color {
    background-color: #000;
}

/*--------------------------------------------------------------
# Custom Block Styles for Editor (register_block_style)
--------------------------------------------------------------*/

/* Button Block Styles */
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid currentColor;
    color: #0073aa;
}

.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: #0073aa;
    color: #fff;
}

.editor-styles-wrapper .wp-block-button.is-style-squared .wp-block-button__link {
    border-radius: 4px;
}

/* Quote Block Styles */
.editor-styles-wrapper .wp-block-quote.is-style-fancy-quote {
    border: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2em;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.editor-styles-wrapper .wp-block-quote.is-style-fancy-quote::before {
    content: '"';
    font-size: 4em;
    color: #0073aa;
    position: absolute;
    top: 10px;
    left: 20px;
    line-height: 1;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.editor-styles-wrapper .wp-block-quote.is-style-fancy-quote p {
    font-style: italic;
    font-size: 1.2em;
    margin-left: 40px;
    position: relative;
    z-index: 2;
}

/* Image Block Styles */
.editor-styles-wrapper .wp-block-image.is-style-rounded img {
    border-radius: 50%;
}

/* Cover Block Styles */
.editor-styles-wrapper .wp-block-cover.is-style-blur-overlay {
    overflow: hidden;
}

.editor-styles-wrapper .wp-block-cover.is-style-blur-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(2px);
    z-index: 1;
}

/* Group Block Styles */
.editor-styles-wrapper .wp-block-group.is-style-shadow-box {
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: #fff;
    border: 1px solid #e9ecef;
}

/* List Block Styles */
.editor-styles-wrapper .wp-block-list.is-style-no-bullets {
    list-style: none;
    padding-left: 0;
}

.editor-styles-wrapper .wp-block-list.is-style-checkmark-list {
    list-style: none;
    padding-left: 0;
}

.editor-styles-wrapper .wp-block-list.is-style-checkmark-list li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 0.5em;
}

.editor-styles-wrapper .wp-block-list.is-style-checkmark-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #00a32a;
    font-weight: bold;
    font-size: 1.2em;
}

/* Separator Block Styles */
.editor-styles-wrapper .wp-block-separator.is-style-wide {
    width: 100%;
    border: none;
    border-top: 2px solid #ddd;
    margin: 2em auto;
}

.editor-styles-wrapper .wp-block-separator.is-style-dots {
    background: none;
    border: none;
    text-align: center;
    max-width: none;
    line-height: 1;
    height: auto;
}

.editor-styles-wrapper .wp-block-separator.is-style-dots::before {
    content: "···";
    color: #999;
    font-size: 1.5em;
    letter-spacing: 2em;
    padding-left: 2em;
}

/* Table Block Styles */
.editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

/* Social Links Block Styles */
.editor-styles-wrapper .wp-block-social-links.is-style-logos-only .wp-social-link {
    background-color: transparent !important;
    color: #666;
}

.editor-styles-wrapper .wp-block-social-links.is-style-logos-only .wp-social-link:hover {
    color: #0073aa;
    transform: scale(1.1);
}