/*
 * Editor Styles
 * 
 * Styles for the WordPress block editor to match frontend appearance
 * 
 * @package Edukate
 */

/* Local Jost Fonts (no Google Fonts import) */
@font-face {
    font-family: 'Jost';
    src: url('./fonts/jost-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jost';
    src: url('./fonts/jost-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Jost';
    src: url('./fonts/jost-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* Base editor styling */
.editor-styles-wrapper {
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
}

/* Typography */
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin: 1em 0 0.5em;
    color: #2c3e50;
}

.editor-styles-wrapper h1 { font-size: 2.5em; }
.editor-styles-wrapper h2 { font-size: 2.2em; }
.editor-styles-wrapper h3 { font-size: 1.8em; }
.editor-styles-wrapper h4 { font-size: 1.5em; }
.editor-styles-wrapper h5 { font-size: 1.3em; }
.editor-styles-wrapper h6 { font-size: 1.1em; }

.editor-styles-wrapper p {
    margin: 1em 0;
    line-height: 1.7;
}

/* Links */
.editor-styles-wrapper a {
    color: #007cba;
    text-decoration: none;
}

.editor-styles-wrapper a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Lists */
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
    margin: 1em 0;
    padding-left: 2em;
}

.editor-styles-wrapper li {
    margin: 0.5em 0;
}

/* Blockquotes */
.editor-styles-wrapper blockquote {
    border-left: 4px solid #007cba;
    margin: 1.5em 0;
    padding: 1em 2em;
    background-color: #f8f9fa;
    font-style: italic;
}

.editor-styles-wrapper blockquote p {
    margin: 0;
}

.editor-styles-wrapper blockquote cite {
    display: block;
    margin-top: 1em;
    font-size: 0.9em;
    color: #666;
    font-style: normal;
}

/* Code blocks */
.editor-styles-wrapper code {
    background-color: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
    font-size: 0.9em;
}

.editor-styles-wrapper pre {
    background-color: #f4f4f4;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1em 0;
}

.editor-styles-wrapper pre code {
    background: none;
    padding: 0;
}

/* Tables */
.editor-styles-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.editor-styles-wrapper th,
.editor-styles-wrapper td {
    border: 1px solid #ddd;
    padding: 0.75em;
    text-align: left;
}

.editor-styles-wrapper th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Images */
.editor-styles-wrapper img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.editor-styles-wrapper .aligncenter {
    display: block;
    margin: 1em auto;
}

.editor-styles-wrapper .alignright {
    float: right;
    margin: 0 0 1em 1em;
}

.editor-styles-wrapper .alignleft {
    float: left;
    margin: 0 1em 1em 0;
}

/* Wide and full-width alignments */
.editor-styles-wrapper .alignwide {
    margin-left: calc(-25vw + 50%);
    margin-right: calc(-25vw + 50%);
    max-width: none;
    width: auto;
}

.editor-styles-wrapper .alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: none;
    width: auto;
}

/* Buttons */
.editor-styles-wrapper .wp-block-button .wp-block-button__link {
    background-color: #007cba;
    border-radius: 5px;
    color: #fff;
    padding: 0.75em 1.5em;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.editor-styles-wrapper .wp-block-button .wp-block-button__link:hover {
    background-color: #005a87;
}

.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid #007cba;
    color: #007cba;
}

.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: #007cba;
    color: #fff;
}

/* Separator */
.editor-styles-wrapper .wp-block-separator {
    border: none;
    border-top: 2px solid #ddd;
    margin: 2em 0;
}

.editor-styles-wrapper .wp-block-separator.is-style-wide {
    border-top-width: 3px;
}

.editor-styles-wrapper .wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
}

.editor-styles-wrapper .wp-block-separator.is-style-dots::before {
    content: "···";
    color: #ddd;
    font-size: 1.5em;
    letter-spacing: 1em;
    padding-left: 1em;
}

/* Pullquote */
.editor-styles-wrapper .wp-block-pullquote {
    border-top: 4px solid #007cba;
    border-bottom: 4px solid #007cba;
    margin: 2em 0;
    padding: 2em 0;
    text-align: center;
}

.editor-styles-wrapper .wp-block-pullquote blockquote {
    border-left: none;
    background: none;
    font-size: 1.5em;
    margin: 0;
    padding: 0;
}

.editor-styles-wrapper .wp-block-pullquote cite {
    color: #666;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cover block */
.editor-styles-wrapper .wp-block-cover {
    margin: 2em 0;
    min-height: 400px;
}

/* Group block */
.editor-styles-wrapper .wp-block-group {
    margin: 2em 0;
}

/* Columns */
.editor-styles-wrapper .wp-block-columns {
    margin: 2em 0;
}

/* Media & Text */
.editor-styles-wrapper .wp-block-media-text {
    margin: 2em 0;
}

/* Responsive embeds support */
.editor-styles-wrapper .wp-block-embed.is-responsive {
    position: relative;
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.editor-styles-wrapper .wp-block-embed.is-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Editor color palette */
.has-primary-color { color: #007cba; }
.has-primary-background-color { background-color: #007cba; }
.has-secondary-color { color: #2c3e50; }
.has-secondary-background-color { background-color: #2c3e50; }
.has-text-color { color: #333; }
.has-text-background-color { background-color: #333; }
.has-light-gray-color { color: #f8f9fa; }
.has-light-gray-background-color { background-color: #f8f9fa; }

/* Make sure editor content area matches theme width */
.editor-styles-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}