
/* =========================================================
   CURSIVE TEXT GENERATOR
   CharacterCounter.com
========================================================= */


/* =========================================================
   BASE / BOX SIZING
========================================================= */

.cursive-generator-main,
.cursive-generator-main *,
.cursive-generator-main *::before,
.cursive-generator-main *::after {
    box-sizing: border-box;
}

.cursive-generator-main {
    width: 100%;
    background: #ffffff;
    color: #202124;
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================================================
   PAGE / MAIN LAYOUT
========================================================= */

.cursive-generator-section {
    width: 100%;
    padding: 68px 20px 70px;
}

.cursive-generator-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 300px;
    gap: 40px;

    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    align-items: stretch;
}

.cursive-main-column {
    min-width: 0;
}


/* =========================================================
   VISUALLY HIDDEN
========================================================= */

.cursive-generator-main .visually-hidden {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


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

.cursive-generator-main .tool-header {
    margin-bottom: 26px;
}

.cursive-generator-main .tool-header h1 {
    margin: 0 0 12px;

    color: #202124;

    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.cursive-generator-main .tool-intro {
    max-width: 760px;

    margin: 0;

    color: #5f6368;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
}


/* =========================================================
   SECTION TITLES
========================================================= */

.cursive-generator-main .cursive-section-title {
    margin: 0 0 10px;

    color: #202124;

    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}


/* =========================================================
   TEXT INPUT SECTION
========================================================= */

.cursive-input-section {
    width: 100%;

    margin-bottom: 26px;
}

.cursive-textarea-wrapper {
    position: relative;

    width: 100%;
}

.cursive-textarea {
    display: block;

    width: 100%;
    height: 120px;
    min-height: 90px;

    padding: 15px 16px 48px;

    border: 1px solid #dadce0;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;

    resize: vertical;

    overflow-x: hidden;
    overflow-y: auto;

    overflow-wrap: anywhere;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.cursive-textarea::placeholder {
    color: #80868b;
    opacity: 1;
}

.cursive-textarea:hover {
    border-color: #bdc1c6;
}

.cursive-textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}


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

.cursive-textarea-actions {
    position: absolute;

    right: 11px;
    bottom: 11px;

    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 7px;

    pointer-events: none;
}

.cursive-textarea-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 65px;

    padding: 7px 12px;

    border: 1px solid rgba(218, 220, 224, 0.95);
    border-radius: 5px;

    background: rgba(248, 249, 250, 0.96);
    color: #3c4043;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;

    white-space: nowrap;

    cursor: pointer;

    pointer-events: auto;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.cursive-textarea-button:hover {
    border-color: #bdc1c6;
    background: #f1f3f4;
}

.cursive-textarea-button:active {
    background: #e8eaed;
}

.cursive-textarea-button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}


/* =========================================================
   GENERATED CURSIVE RESULTS
========================================================= */

.cursive-results-section {
    width: 100%;

    margin-bottom: 48px;
}

.cursive-results-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 12px;
}

.cursive-results-heading .cursive-section-title {
    margin: 0;
}


/* =========================================================
   CURSIVE STYLES GRID

   Desktop: 2 columns
   Mobile: 1 column
========================================================= */

.cursive-styles-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px;

    width: 100%;

    align-items: stretch;
}


/* =========================================================
   INDIVIDUAL STYLE CARD
========================================================= */

.cursive-style-card {
    display: flex;

    flex-direction: column;

    min-width: 0;

    padding: 14px;

    border: 1px solid #dadce0;
    border-radius: 8px;

    background: #ffffff;

    overflow: hidden;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.cursive-style-card:hover {
    border-color: #bdc1c6;

    box-shadow:
        0 1px 5px rgba(60, 64, 67, 0.08);
}

.cursive-style-card:focus-within {
    border-color: #1a73e8;
}


/* =========================================================
   STYLE CARD HEADER
========================================================= */

.cursive-style-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    width: 100%;

    margin-bottom: 12px;
}

.cursive-style-name {
    min-width: 0;

    margin: 0;

    color: #3c4043;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;

    overflow-wrap: anywhere;
}


/* =========================================================
   COPY BUTTONS
========================================================= */

.cursive-copy-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    gap: 5px;

    min-width: 73px;

    padding: 7px 10px;

    border: 1px solid #dadce0;
    border-radius: 5px;

    background: #f8f9fa;
    color: #3c4043;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    white-space: nowrap;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.cursive-copy-button i {
    font-size: 15px;
    font-weight: 400;
}

.cursive-copy-button:hover {
    border-color: #bdc1c6;
    background: #f1f3f4;
}

.cursive-copy-button:active {
    background: #e8eaed;
}

.cursive-copy-button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}


/* =========================================================
   SCROLLABLE CURSIVE PREVIEW

   Fixed-height output boxes.

   Short text stays vertically centered.
   Long text scrolls within the box.

   Clicking the preview copies the complete output.
========================================================= */

.cursive-style-preview {
    display: block;

    width: 100%;
    min-width: 0;

    height: 130px;
    min-height: 130px;
    max-height: 130px;

    flex: 0 0 130px;

    margin: 0;

    padding: 12px;

    border: 1px solid #edf0f2;
    border-radius: 6px;

    background: #fafbfc;
    color: #202124;

    overflow-x: hidden;
    overflow-y: auto;

    overscroll-behavior: contain;

    text-align: center;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.cursive-style-preview:hover {
    background: #f3f7fd;
    border-color: #d2e3fc;
}

.cursive-style-preview:active {
    background: #e8f0fe;
}

.cursive-style-preview:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}


/* =========================================================
   CURSIVE PREVIEW TEXT

   Grid positioning centers short text.

   min-height: 100% allows the content to grow beyond
   the viewport when the user enters longer text.
========================================================= */

.cursive-style-preview span {
    display: grid;

    place-items: center;

    width: 100%;
    min-width: 0;
    min-height: 100%;

    margin: 0;
    padding: 0;

    color: #202124;

    font-family:
        "Cambria Math",
        "STIX Two Math",
        "Segoe UI Symbol",
        "Apple Symbols",
        "Noto Sans Math",
        Arial,
        sans-serif;

    font-size: 25px;
    font-weight: 400;
    line-height: 1.65;

    white-space: pre-wrap;

    overflow-wrap: anywhere;
    word-break: normal;

    text-align: center;

    font-synthesis: none;
}


/* =========================================================
   COPY SUCCESS STATES
========================================================= */

.cursive-copy-button.copied,
.cursive-copy-button.is-copied,
.cursive-alphabet-copy-button.copied,
.cursive-alphabet-copy-button.is-copied,
.cursive-letter-button.copied,
.cursive-letter-button.is-copied {
    border-color: #b7dfc8;
    background: #e6f4ea;
    color: #188038;
}

.cursive-style-preview.copied,
.cursive-style-preview.is-copied {
    border-color: #b7dfc8;
    background: #f0faf3;
}


/* =========================================================
   COPY ERROR STATE
========================================================= */

.cursive-copy-button.copy-error,
.cursive-alphabet-copy-button.copy-error,
.cursive-letter-button.copy-error {
    border-color: #f4b7b3;
    background: #fce8e6;
    color: #c5221f;
}


/* =========================================================
   DISABLED STATES
========================================================= */

.cursive-copy-button:disabled,
.cursive-style-preview:disabled,
.cursive-alphabet-copy-button:disabled,
.cursive-letter-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* =========================================================
   CURSIVE ALPHABET SECTION
========================================================= */

.cursive-alphabet-section {
    width: 100%;

    margin: 0 0 44px;

    color: #3c4043;
}

.cursive-alphabet-section > h2 {
    margin: 0 0 13px;

    color: #202124;

    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
}

.cursive-alphabet-section > p {
    margin: 0 0 22px;

    color: #3c4043;

    font-size: 16px;
    line-height: 1.72;
}


/* =========================================================
   ALPHABET PANELS
========================================================= */

.cursive-alphabet-panel {
    width: 100%;

    margin-bottom: 22px;
    padding: 20px;

    border: 1px solid #dadce0;
    border-radius: 8px;

    background: #ffffff;
}

.cursive-alphabet-panel:last-child {
    margin-bottom: 0;
}

.cursive-alphabet-panel > h3 {
    margin: 0 0 19px;

    color: #202124;

    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}


/* =========================================================
   UPPERCASE / LOWERCASE GROUPS
========================================================= */

.cursive-alphabet-case {
    width: 100%;

    margin-bottom: 25px;
}

.cursive-alphabet-case:last-child {
    margin-bottom: 0;
}

.cursive-alphabet-case-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 9px 12px;

    margin-bottom: 12px;
}

.cursive-alphabet-case-header h4 {
    margin: 0;

    color: #3c4043;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}


/* =========================================================
   COPY FULL ALPHABET BUTTON
========================================================= */

.cursive-alphabet-copy-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    flex: 0 0 auto;

    padding: 8px 12px;

    border: 1px solid #dadce0;
    border-radius: 5px;

    background: #f8f9fa;
    color: #3c4043;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    white-space: nowrap;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.cursive-alphabet-copy-button i {
    font-size: 15px;
}

.cursive-alphabet-copy-button:hover {
    border-color: #bdc1c6;
    background: #f1f3f4;
}

.cursive-alphabet-copy-button:active {
    background: #e8eaed;
}

.cursive-alphabet-copy-button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}


/* =========================================================
   FULL ALPHABET PREVIEW
========================================================= */

.cursive-alphabet-preview {
    display: block;

    width: 100%;

    margin: 0 0 15px;
    padding: 15px;

    border: 1px solid #edf0f2;
    border-radius: 6px;

    background: #fafbfc;
    color: #202124;

    font-family:
        "Cambria Math",
        "STIX Two Math",
        "Segoe UI Symbol",
        "Apple Symbols",
        "Noto Sans Math",
        Arial,
        sans-serif;

    font-size: 23px;
    font-weight: 400;
    line-height: 1.8;

    text-align: left;

    overflow-wrap: anywhere;
    word-break: normal;

    font-synthesis: none;
}


/* =========================================================
   INDIVIDUAL ALPHABET LETTER GRID
========================================================= */

.cursive-letter-grid {
    display: grid;

    grid-template-columns:
        repeat(10, minmax(0, 1fr));

    gap: 8px;

    width: 100%;
}


/* =========================================================
   INDIVIDUAL LETTER BUTTONS
========================================================= */

.cursive-letter-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;
    min-height: 48px;

    padding: 7px 3px;

    border: 1px solid #dadce0;
    border-radius: 6px;

    background: #ffffff;
    color: #202124;

    font-family:
        "Cambria Math",
        "STIX Two Math",
        "Segoe UI Symbol",
        "Apple Symbols",
        "Noto Sans Math",
        Arial,
        sans-serif;

    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;

    text-align: center;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    font-synthesis: none;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

.cursive-letter-button:hover {
    border-color: #a8c7fa;
    background: #e8f0fe;
    color: #174ea6;
}

.cursive-letter-button:active {
    background: #d2e3fc;
}

.cursive-letter-button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}


/* =========================================================
   INFORMATIONAL / SEO CONTENT
========================================================= */

.cursive-generator-content {
    width: 100%;

    color: #3c4043;
}

.cursive-generator-content h2 {
    margin: 38px 0 13px;

    color: #202124;

    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
}

.cursive-generator-content h2:first-child {
    margin-top: 0;
}

.cursive-generator-content h3 {
    margin: 27px 0 8px;

    color: #202124;

    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.cursive-generator-content p {
    margin: 0 0 17px;

    color: #3c4043;

    font-size: 16px;
    font-weight: 400;
    line-height: 1.72;
}

.cursive-generator-content strong {
    color: #202124;
    font-weight: 600;
}

.cursive-generator-content a,
.cursive-alphabet-section a {
    color: #1a73e8;
    text-decoration: none;
}

.cursive-generator-content a:hover,
.cursive-generator-content a:focus,
.cursive-alphabet-section a:hover,
.cursive-alphabet-section a:focus {
    color: #1558b0;
    text-decoration: underline;
}


/* =========================================================
   RELATED TOOLS
========================================================= */

.cursive-related-tools-list {
    margin: 0 0 24px;
    padding-left: 25px;
}

.cursive-related-tools-list li {
    margin-bottom: 9px;

    color: #3c4043;

    font-size: 16px;
    line-height: 1.65;
}

.cursive-related-tools-list li::marker {
    color: #5f6368;
}

.cursive-related-tools-list a {
    font-weight: 500;
}


/* =========================================================
   RAPTIVE SIDEBAR
========================================================= */

.cursive-generator-main #sidebar {
    width: 300px;
    min-width: 300px;

    min-height: 600px;

    align-self: stretch;

    position: relative;
}


/* =========================================================
   FOCUS STATES
========================================================= */

.cursive-generator-main button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.cursive-textarea:focus-visible {
    outline: none;
}


/* =========================================================
   SMALLER DESKTOP
========================================================= */

@media only screen and (max-width: 1100px) {

    .cursive-generator-layout {
        grid-template-columns:
            minmax(0, 1fr) 300px;

        gap: 28px;
    }

    .cursive-style-preview span {
        font-size: 23px;
    }

    .cursive-letter-grid {
        grid-template-columns:
            repeat(8, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET / RAPTIVE BREAKPOINT
========================================================= */

@media only screen and (max-width: 992px) {

    .cursive-generator-section {
        padding-top: 82px;
    }

    .cursive-generator-layout {
        display: block;

        max-width: 760px;
    }

    .cursive-generator-main #sidebar {
        display: none;
    }

    .cursive-generator-main .tool-header h1 {
        font-size: 32px;
    }

    .cursive-style-preview span {
        font-size: 25px;
    }

    .cursive-letter-grid {
        grid-template-columns:
            repeat(10, minmax(0, 1fr));
    }

}


/* =========================================================
   MEDIUM TABLET
========================================================= */

@media only screen and (max-width: 800px) {

    .cursive-generator-layout {
        max-width: 760px;
    }

    .cursive-style-preview span {
        font-size: 23px;
    }

    .cursive-letter-grid {
        grid-template-columns:
            repeat(9, minmax(0, 1fr));
    }

}


/* =========================================================
   SMALL TABLET
========================================================= */

@media only screen and (max-width: 700px) {

    .cursive-generator-section {
        padding: 82px 16px 55px;
    }

    .cursive-generator-main .tool-header {
        margin-bottom: 24px;
    }

    .cursive-generator-main .tool-header h1 {
        font-size: 30px;
    }

    .cursive-generator-main .tool-intro {
        font-size: 16px;
        line-height: 1.6;
    }

    .cursive-input-section {
        margin-bottom: 25px;
    }

    .cursive-textarea {
        height: 115px;
        min-height: 90px;
    }

    .cursive-alphabet-panel {
        padding: 17px;
    }

    .cursive-letter-grid {
        grid-template-columns:
            repeat(8, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE

   One-column cursive styles.

   Output boxes remain fixed height and scrollable.
========================================================= */

@media only screen and (max-width: 600px) {

    .cursive-generator-section {
        padding-left: 15px;
        padding-right: 15px;
    }

    .cursive-generator-main .tool-header h1 {
        font-size: 29px;
    }

    .cursive-generator-main .cursive-section-title {
        font-size: 19px;
    }

    .cursive-styles-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cursive-style-card {
        padding: 13px;
    }

    .cursive-style-header {
        margin-bottom: 10px;
    }

    .cursive-style-preview {
        height: 120px;
        min-height: 120px;
        max-height: 120px;

        flex-basis: 120px;

        padding: 12px 10px;
    }

    .cursive-style-preview span {
        font-size: 25px;
        line-height: 1.6;
    }

    .cursive-results-section {
        margin-bottom: 40px;
    }

    .cursive-alphabet-section > h2,
    .cursive-generator-content h2 {
        font-size: 23px;
    }

    .cursive-alphabet-panel > h3,
    .cursive-generator-content h3 {
        font-size: 18px;
    }

    .cursive-alphabet-preview {
        font-size: 21px;
    }

    .cursive-letter-grid {
        grid-template-columns:
            repeat(7, minmax(0, 1fr));

        gap: 7px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media only screen and (max-width: 420px) {

    .cursive-generator-section {
        padding: 78px 13px 45px;
    }

    .cursive-generator-main .tool-header h1 {
        font-size: 27px;
    }

    .cursive-generator-main .tool-intro {
        font-size: 15px;
        line-height: 1.6;
    }

    .cursive-textarea {
        height: 110px;

        padding: 13px 13px 46px;

        font-size: 16px;
    }

    .cursive-style-card {
        padding: 12px;
    }

    .cursive-style-name {
        font-size: 13px;
    }

    .cursive-copy-button {
        min-width: 68px;
        padding: 7px 9px;
    }

    .cursive-style-preview span {
        font-size: 23px;
    }

    .cursive-alphabet-panel {
        padding: 14px;
    }

    .cursive-alphabet-case-header h4 {
        font-size: 14px;
    }

    .cursive-alphabet-copy-button {
        font-size: 12px;
        padding: 7px 9px;
    }

    .cursive-alphabet-preview {
        padding: 12px;

        font-size: 20px;
        line-height: 1.8;
    }

    .cursive-letter-grid {
        grid-template-columns:
            repeat(6, minmax(0, 1fr));

        gap: 6px;
    }

    .cursive-letter-button {
        min-height: 44px;

        font-size: 21px;
    }

    .cursive-alphabet-section > h2,
    .cursive-generator-content h2 {
        font-size: 22px;
    }

    .cursive-generator-content p,
    .cursive-alphabet-section > p,
    .cursive-related-tools-list li {
        font-size: 15px;
        line-height: 1.7;
    }

}


/* =========================================================
   VERY SMALL SCREENS
========================================================= */

@media only screen and (max-width: 340px) {

    .cursive-generator-section {
        padding-left: 10px;
        padding-right: 10px;
    }

    .cursive-generator-main .tool-header h1 {
        font-size: 25px;
    }

    .cursive-style-preview span {
        font-size: 21px;
    }

    .cursive-letter-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }

    .cursive-letter-button {
        font-size: 20px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cursive-generator-main *,
    .cursive-generator-main *::before,
    .cursive-generator-main *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}
