/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
}


body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f3f4f6;

    color: #172033;

}



/* =========================================
   APP
========================================= */

.app {

    display: grid;

    grid-template-columns: 380px 1fr;

    min-height: 100vh;

}



/* =========================================
   EDITOR
========================================= */

.editor {

    background: #ffffff;

    border-right: 1px solid #dddddd;

    padding: 24px;

    overflow-y: auto;

}


.editor h1 {

    margin: 0 0 6px;

    font-size: 24px;

}


.description {

    margin-top: 0;

    color: #6b7280;

    font-size: 14px;

    line-height: 1.5;

}



/* =========================================
   EDITOR SECTIONS
========================================= */

.editor-section {

    background: #fafafa;

    border: 1px solid #dddddd;

    border-radius: 10px;

    padding: 16px;

    margin-top: 16px;

}


.editor-section h2 {

    margin: 0 0 14px;

    font-size: 15px;

}


.section-heading {

    display: flex;

    align-items: center;

    justify-content: space-between;

}



/* =========================================
   FORMULÄR
========================================= */

label {

    display: block;

    margin-top: 14px;

    margin-bottom: 6px;

    font-size: 12px;

    font-weight: bold;

    color: #4b5563;

}


input[type="text"],
textarea {

    width: 100%;

    border: 1px solid #ccd1d9;

    border-radius: 7px;

    padding: 10px;

    font: inherit;

    background: #ffffff;

}


textarea {

    min-height: 110px;

    resize: vertical;

    line-height: 1.5;

}



/* =========================================
   KNAPPAR
========================================= */

button {

    border: 0;

    border-radius: 7px;

    padding: 10px 14px;

    cursor: pointer;

    font-weight: bold;

}


button:hover {

    opacity: 0.9;

}


.small-button {

    background: #e9edff;

    color: #3730a3;

    padding: 7px 10px;

    font-size: 12px;

}


.primary-button {

    width: 100%;

    background: #172033;

    color: #ffffff;

    margin-top: 16px;

}


.secondary-button {

    width: 100%;

    background: #e9edf3;

    color: #172033;

    margin-top: 8px;

}


.delete-button {

    background: #fee2e2;

    color: #991b1b;

    margin-top: 12px;

    font-size: 12px;

}



/* =========================================
   NYHETS-EDITOR
========================================= */

.article-editor {

    background: #ffffff;

    border: 1px solid #dddddd;

    border-radius: 8px;

    padding: 12px;

    margin-top: 10px;

}


.article-editor-title {

    font-size: 13px;

    font-weight: bold;

    margin-bottom: 8px;

}



/* =========================================
   PREVIEW
========================================= */

.preview {

    padding: 30px;

    overflow: auto;

}


.preview-header {

    max-width: 680px;

    margin: 0 auto 10px;

    color: #6b7280;

    font-size: 12px;

    text-transform: uppercase;

}


.email-container {

    max-width: 680px;

    margin: auto;

}


#emailPreview {

    background: #ffffff;

    box-shadow:
        0 4px 24px rgba(
            0,
            0,
            0,
            0.08
        );

}



/* =========================================
   HEADER
========================================= */

.email-header {

    min-height: 110px;

    padding: 18px 30px;

    display: grid;

    grid-template-columns: 100px 1fr 100px;

    align-items: center;

    border-bottom: 1px solid #eeeeee;

}


.header-logo {

    grid-column: 1;

    display: flex;

    align-items: center;

    justify-content: flex-start;

}


.logo {

    display: block;

    width: 80px;

    max-width: 80px;

    height: auto;

}


.header-title {

    grid-column: 2;

    text-align: center;

}


.header-spacer {

    grid-column: 3;

}


.newsletter-name {

    font-size: 22px;

    line-height: 1.2;

    font-weight: bold;

    color: #172033;

}


.newsletter-date {

    margin-top: 6px;

    font-size: 14px;

    color: #6b7280;

}



/* =========================================
   INNEHÅLL
========================================= */

.email-content {

    padding: 30px;

}


.intro {

    margin: 0 0 25px;

    color: #4b5563;

    font-size: 17px;

    line-height: 1.6;

}



/* =========================================
   NYHETER
========================================= */

.article {

    border-top: 1px solid #eeeeee;

    padding: 24px 0;

}


.article h2 {

    margin: 0 0 8px;

    font-size: 22px;

    line-height: 1.3;

}


.article p {

    margin: 0;

    color: #4b5563;

    font-size: 15px;

    line-height: 1.6;

}



/* =========================================
   SIGNATUR
========================================= */

.email-signature {

    margin-top: 30px;

    padding-top: 0;

    border-top: 0;

    color: #4b5563;

    font-size: 14px;

    line-height: 1.6;

}


.wave-divider {

    display: block;

    width: 100%;

    max-width: 220px;

    height: auto;

    margin: 0 auto 14px;

}


.email-signature p {

    margin: 0 0 20px;

}


.email-signature a {

    color: #172033;

    text-decoration: underline;

}



/* =========================================
   ACTIONS
========================================= */

.actions {

    position: sticky;

    bottom: 0;

    background: #ffffff;

    padding-top: 12px;

}



/* =========================================
   MOBIL
========================================= */

@media (max-width: 900px) {

    .app {

        grid-template-columns: 1fr;

    }


    .editor {

        border-right: 0;

        border-bottom: 1px solid #dddddd;

    }


    .preview {

        padding: 16px;

    }

}


@media (max-width: 600px) {

    .email-header {

        min-height: 90px;

        padding: 15px 18px;

        grid-template-columns: 90px 1fr 20px;

    }


    .logo {

        width: 70px;

        max-width: 70px;

    }


    .newsletter-name {

        font-size: 17px;

    }


    .newsletter-date {

        font-size: 12px;

    }


    .email-content {

        padding: 22px;

    }

}