
/* =========================================================
   TEXT REPEATER — CharacterCounter.com

   DESKTOP:
   - Your Text and Repeat Settings on the left
   - Repeated Text results on the right
   - Copy button in top-right of output textarea
   - No excessive top padding in output
   - Three output statistics
   - 300px Raptive sidebar

   TABLET / MOBILE:
   - Responsive input and output panels
   - Input -> Settings -> Results on mobile
   - Touch-friendly controls
   - Sidebar hidden below 900px
   ========================================================= */


/* =========================================================
   PAGE BASE
   ========================================================= */

.text-repeater-page {
    width: 100%;
    padding: 105px 15px 45px;

    color: #333;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.text-repeater-page,
.text-repeater-page *,
.text-repeater-page *::before,
.text-repeater-page *::after {
    box-sizing: border-box;
}

.text-repeater-page [hidden] {
    display: none !important;
}

.text-repeater-page button,
.text-repeater-page textarea,
.text-repeater-page select,
.text-repeater-page input {
    font-family: "Roboto", Arial, sans-serif;
}

.text-repeater-page button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.text-repeater-page a {
    color: #1155cc;
    text-decoration: none;
}

.text-repeater-page a:hover {
    text-decoration: underline;
}

.text-repeater-page a:focus-visible,
.text-repeater-page button:focus-visible,
.text-repeater-page textarea:focus-visible,
.text-repeater-page select:focus-visible,
.text-repeater-page input:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;
}

.text-repeater-page button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


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

   Main Content | 300px Raptive Sidebar
   ========================================================= */

.text-repeater-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        300px;

    align-items: stretch;

    gap: 28px;

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

    margin: 0 auto;
}

.text-repeater-main {
    width: 100%;
    min-width: 0;
}

.text-repeater-sidebar {
    display: block;

    width: 300px;
    min-width: 300px;
    min-height: 100%;

    align-self: stretch;

    margin: 0;
    padding: 0;
}


/* =========================================================
   PAGE HEADING
   ========================================================= */

.text-repeater-heading {
    width: 100%;

    margin: 0 0 22px;

    text-align: center;
}

.text-repeater-heading h1 {
    margin: 0 0 9px;
    padding: 0;

    color: #333;

    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;

    overflow-wrap: break-word;
}

.text-repeater-intro {
    width: 100%;
    max-width: 760px;

    margin: 0 auto;
    padding: 0;

    color: #555;

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


/* =========================================================
   JAVASCRIPT NOTICE
   ========================================================= */

.text-repeater-notice {
    margin: 0 0 18px;
    padding: 12px 15px;

    border: 1px solid #e3cf9b;
    border-radius: 7px;

    background: #fff9eb;
    color: #665022;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   MAIN TEXT REPEATER TOOL
   ========================================================= */

.text-repeater-tool {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    margin: 0 0 38px;
    padding: 0;

    gap: 16px;
}


/* =========================================================
   WARNINGS AND ERRORS
   ========================================================= */

.text-repeater-warning {
    width: 100%;

    margin: 0;
    padding: 12px 15px;

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

    background: #fff9eb;
    color: #74531e;

    font-size: 14px;
    line-height: 1.55;

    overflow-wrap: anywhere;
}

.text-repeater-warning.is-error {
    border-color: #e7b1b1;

    background: #fff1f1;
    color: #a12424;
}

.text-repeater-warning.is-success {
    border-color: #a8d9b5;

    background: #f1fff4;
    color: #246b38;
}


/* =========================================================
   GENERATOR GRID

   DESKTOP:
   Left: Input + Settings
   Right: Repeated Text

   MOBILE:
   Left column content first
   Results underneath
   ========================================================= */

.text-repeater-generator-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.15fr);

    align-items: start;

    gap: 20px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}

.text-repeater-left-column {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    gap: 18px;
}


/* =========================================================
   PANEL STYLING
   ========================================================= */

.text-repeater-input-panel,
.text-repeater-options,
.text-repeater-results {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 18px;

    border: 1px solid #dce2e9;
    border-radius: 11px;

    background: #fff;
}

.text-repeater-input-panel {
    gap: 12px;
}

.text-repeater-options {
    gap: 18px;
}

.text-repeater-results {
    gap: 14px;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.text-repeater-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 8px 12px;

    width: 100%;

    margin: 0;
    padding: 0;
}

.text-repeater-section-heading h2 {
    margin: 0;
    padding: 0;

    color: #333;

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


/* =========================================================
   INPUT TEXTAREA WRAPPER
   ========================================================= */

.text-repeater-input-wrapper {
    position: relative;

    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   INPUT TEXTAREA
   ========================================================= */

.text-repeater-page .text-repeater-input {
    display: block;

    width: 100%;
    max-width: 100%;

    height: 160px;
    min-height: 110px;

    margin: 0;
    padding: 14px 14px 54px;

    border: 2px solid #c9ced6;
    border-radius: 10px;

    background: #fff;
    color: #222;

    font-family: "Roboto", Arial, sans-serif;

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

    outline: none;

    resize: vertical;

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

    overflow-wrap: break-word;

    box-shadow: none;

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

.text-repeater-page .text-repeater-input::placeholder {
    color: #9299a2;
    opacity: 1;
}

.text-repeater-page .text-repeater-input:hover {
    border-color: #aeb4bd;
}

.text-repeater-page .text-repeater-input:focus {
    border-color: #1a73e8;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}


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

   Clear button remains bottom-right.
   ========================================================= */

.text-repeater-input-actions {
    position: absolute;

    right: 11px;
    bottom: 11px;

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

    gap: 7px;

    z-index: 2;

    max-width: calc(100% - 22px);
}


/* =========================================================
   INLINE ACTION BUTTONS

   Copy and Clear inside textareas
   ========================================================= */

.text-repeater-inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 34px;

    margin: 0;
    padding: 7px 11px;

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

    background: #fff;
    color: #145ba8;

    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;

    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05);

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

.text-repeater-inline-button i {
    font-size: 16px;
    line-height: 1;
}

.text-repeater-inline-button:hover:not(:disabled) {
    border-color: #9bbce5;

    background: #e5f0ff;
    color: #104b8d;
}

.text-repeater-inline-button:active:not(:disabled) {
    background: #d8e9ff;
}

.text-repeater-inline-button:disabled {
    background: #f5f6f8;
    color: #8a919a;

    border-color: #d7dce3;

    box-shadow: none;
}


/* =========================================================
   FIELD HINTS
   ========================================================= */

.text-repeater-field-hint {
    margin: 0;
    padding: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.55;
}


/* =========================================================
   REPEAT SETTINGS
   ========================================================= */

.text-repeater-option-group {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    gap: 9px;

    margin: 0;
    padding: 0;

    border: 0;
}

.text-repeater-option-title {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #333;

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

.text-repeater-option-help {
    margin: 0;
    padding: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.5;

    overflow-wrap: break-word;
}


/* =========================================================
   NUMBER OF REPETITIONS INPUT
   ========================================================= */

.text-repeater-number-input {
    display: block;

    width: 100%;
    min-width: 0;

    min-height: 44px;

    margin: 0;
    padding: 10px 12px;

    border: 1px solid #c9ced6;
    border-radius: 7px;

    background: #fff;
    color: #222;

    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;

    outline: none;

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

.text-repeater-number-input:hover {
    border-color: #aeb4bd;
}

.text-repeater-number-input:focus {
    border-color: #1a73e8;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}

.text-repeater-number-input:disabled {
    background: #f5f6f8;
    color: #999;
    cursor: not-allowed;
}


/* =========================================================
   QUICK PRESETS
   ========================================================= */

.text-repeater-presets {
    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    width: 100%;

    margin: 0;
    padding: 0;
}

.text-repeater-preset {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 1 1 auto;

    min-width: 50px;
    min-height: 39px;

    margin: 0;
    padding: 8px 12px;

    border: 1px solid #cbd7e7;
    border-radius: 7px;

    background: #f3f7fc;
    color: #145ba8;

    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;

    text-align: center;

    cursor: pointer;

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

.text-repeater-preset:hover:not(:disabled) {
    border-color: #9bbce5;

    background: #e5f0ff;
    color: #104b8d;
}

.text-repeater-preset:active:not(:disabled) {
    background: #d8e9ff;
}

.text-repeater-preset.is-active,
.text-repeater-preset[aria-pressed="true"] {
    border-color: #1a73e8;

    background: #1a73e8;
    color: #fff;

    box-shadow:
        0 2px 5px rgba(26, 115, 232, 0.15);
}

.text-repeater-preset.is-active:hover,
.text-repeater-preset[aria-pressed="true"]:hover {
    border-color: #155fc1;

    background: #155fc1;
    color: #fff;
}


/* =========================================================
   SELECT DROPDOWNS
   ========================================================= */

.text-repeater-select {
    display: block;

    width: 100%;
    min-width: 0;

    min-height: 44px;

    margin: 0;
    padding: 10px 37px 10px 12px;

    border: 1px solid #c9ced6;
    border-radius: 7px;

    background-color: #fff;
    color: #222;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;

    cursor: pointer;

    outline: none;

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

.text-repeater-select:hover {
    border-color: #aeb4bd;
}

.text-repeater-select:focus {
    border-color: #1a73e8;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}

.text-repeater-select:disabled {
    background-color: #f5f6f8;
    color: #999;
    cursor: not-allowed;
}


/* =========================================================
   CUSTOM SEPARATOR INPUT
   ========================================================= */

.text-repeater-custom-separator {
    width: 100%;
}

.text-repeater-text-input {
    display: block;

    width: 100%;
    min-width: 0;

    min-height: 44px;

    margin: 0;
    padding: 10px 12px;

    border: 1px solid #c9ced6;
    border-radius: 7px;

    background: #fff;
    color: #222;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 400;

    outline: none;

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

.text-repeater-text-input::placeholder {
    color: #9299a2;
    opacity: 1;
}

.text-repeater-text-input:hover {
    border-color: #aeb4bd;
}

.text-repeater-text-input:focus {
    border-color: #1a73e8;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}

.text-repeater-text-input:disabled {
    background: #f5f6f8;
    color: #999;
    cursor: not-allowed;
}


/* =========================================================
   CHECKBOX OPTIONS
   ========================================================= */

.text-repeater-checkbox {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #333;

    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;

    cursor: pointer;
}

.text-repeater-checkbox input[type="checkbox"] {
    flex: 0 0 auto;

    width: 18px;
    height: 18px;

    margin: 2px 0 0;
    padding: 0;

    accent-color: #1a73e8;

    cursor: pointer;
}

.text-repeater-checkbox span {
    flex: 1 1 auto;
    min-width: 0;
}


/* =========================================================
   ADDITIONAL OPTIONS SPACING

   Extra space below Additional Options heading.
   ========================================================= */

.text-repeater-option-group legend + .text-repeater-checkbox {
    margin-top: 12px;
}


/* =========================================================
   OUTPUT LIMIT NOTE
   ========================================================= */

.text-repeater-limit-note {
    margin: 0;
    padding: 11px 13px;

    border: 1px solid #e0e5eb;
    border-radius: 7px;

    background: #f8fafc;
    color: #667085;

    font-size: 13px;
    line-height: 1.55;
}


/* =========================================================
   OUTPUT WRAPPER
   ========================================================= */

.text-repeater-output-wrapper {
    position: relative;

    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   REPEATED TEXT OUTPUT TEXTAREA

   Normal padding on all sides.
   No large empty space at the top.
   ========================================================= */

.text-repeater-page .text-repeater-output {
    display: block;

    width: 100%;
    max-width: 100%;

    height: 365px;
    min-height: 190px;
    max-height: none;

    margin: 0;
    padding: 15px;

    border: 2px solid #c9ced6;
    border-radius: 10px;

    background: #f8fafc;
    color: #222;

    font-family:
        "Roboto Mono",
        "Courier New",
        monospace;

    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;

    letter-spacing: 0;

    outline: none;

    resize: vertical;

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

    overflow-wrap: break-word;

    white-space: pre-wrap;

    tab-size: 4;

    box-shadow: none;

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

.text-repeater-page .text-repeater-output::placeholder {
    color: #9299a2;
    opacity: 1;
}

.text-repeater-page .text-repeater-output:hover {
    border-color: #aeb4bd;
}

.text-repeater-page .text-repeater-output:focus {
    border-color: #1a73e8;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}


/* =========================================================
   COPY BUTTON INSIDE OUTPUT

   Copy button positioned top-right.
   ========================================================= */

.text-repeater-output-actions {
    position: absolute;

    top: 11px;
    right: 11px;
    bottom: auto;

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

    gap: 7px;

    z-index: 2;

    max-width: calc(100% - 22px);
}

.text-repeater-copy-button {
    min-width: 78px;
}


/* =========================================================
   LARGE OUTPUT PREVIEW NOTICE
   ========================================================= */

.text-repeater-preview-notice {
    width: 100%;

    margin: 0;
    padding: 10px 12px;

    border: 1px solid #cbd7e7;
    border-radius: 7px;

    background: #f3f7fc;
    color: #385a7e;

    font-size: 13px;
    line-height: 1.5;
}


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

.text-repeater-result-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    flex-wrap: wrap;

    gap: 9px;

    width: 100%;

    margin: 0;
    padding: 0;
}

.text-repeater-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 1 auto;

    gap: 7px;

    min-height: 38px;

    margin: 0;
    padding: 9px 13px;

    border: 1px solid #cbd7e7;
    border-radius: 7px;

    background: #f3f7fc;
    color: #145ba8;

    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;

    text-align: center;

    cursor: pointer;

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

.text-repeater-secondary-button i {
    font-size: 17px;
    line-height: 1;
}

.text-repeater-secondary-button:hover:not(:disabled) {
    border-color: #9bbce5;

    background: #e5f0ff;
    color: #104b8d;
}

.text-repeater-secondary-button:active:not(:disabled) {
    background: #d8e9ff;
}

.text-repeater-secondary-button:disabled {
    border-color: #d7dce3;

    background: #f5f6f8;
    color: #8a919a;
}


/* =========================================================
   OUTPUT STATISTICS
   ========================================================= */

.text-repeater-stats {
    display: grid;

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

    gap: 10px;

    width: 100%;

    margin: 2px 0 0;
    padding: 0;
}

.text-repeater-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    min-width: 0;
    min-height: 83px;

    margin: 0;
    padding: 12px 8px;

    border: 1px solid #dce2e9;
    border-radius: 9px;

    background: #f8fafc;

    text-align: center;
}

.text-repeater-stat-value {
    display: block;

    max-width: 100%;

    margin: 0;
    padding: 0;

    color: #1a73e8;

    font-size: 23px;
    line-height: 1.2;
    font-weight: 700;

    font-variant-numeric: tabular-nums;

    overflow-wrap: anywhere;
}

.text-repeater-stat-label {
    display: block;

    margin: 0;
    padding: 0;

    color: #666;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.text-repeater-sr-only {
    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;
}


/* =========================================================
   INFORMATIONAL ARTICLE
   ========================================================= */

.text-repeater-article {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    color: #444;

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

.text-repeater-article-section {
    width: 100%;
    min-width: 0;

    margin: 0 0 33px;
    padding: 0;
}

.text-repeater-article-section:last-child {
    margin-bottom: 0;
}


/* =========================================================
   ARTICLE HEADINGS
   ========================================================= */

.text-repeater-article h2 {
    margin: 0 0 15px;
    padding: 0;

    color: #333;

    font-size: 25px;
    line-height: 1.35;
    font-weight: 700;

    overflow-wrap: break-word;
}

.text-repeater-article h3 {
    margin: 24px 0 11px;
    padding: 0;

    color: #333;

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

    overflow-wrap: break-word;
}


/* =========================================================
   ARTICLE PARAGRAPHS
   ========================================================= */

.text-repeater-article p {
    margin: 0 0 15px;
    padding: 0;

    color: #444;

    font-size: 16px;
    line-height: 1.75;

    overflow-wrap: break-word;
}

.text-repeater-article p:last-child {
    margin-bottom: 0;
}

.text-repeater-article strong {
    font-weight: 700;
    color: #333;
}


/* =========================================================
   ARTICLE LINKS
   ========================================================= */

.text-repeater-article a {
    color: #1155cc;
    text-decoration: none;

    font-weight: 500;

    overflow-wrap: anywhere;
}

.text-repeater-article a:hover {
    color: #0b469e;
    text-decoration: underline;
}

.text-repeater-article a:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;
}


/* =========================================================
   ARTICLE LISTS
   ========================================================= */

.text-repeater-article-list {
    margin: 0 0 18px;
    padding: 0 0 0 24px;

    color: #444;

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

.text-repeater-article-list li {
    margin: 0 0 11px;
    padding: 0 0 0 4px;
}

.text-repeater-article-list li:last-child {
    margin-bottom: 0;
}

.text-repeater-article ul.text-repeater-article-list {
    list-style-type: disc;
}

.text-repeater-article ol.text-repeater-article-list {
    list-style-type: decimal;
}

.text-repeater-article-list li::marker {
    color: #555;
}


/* =========================================================
   INLINE CODE
   ========================================================= */

.text-repeater-article :not(pre) > code {
    display: inline;

    padding: 2px 5px;

    border: 1px solid #e5e9ef;
    border-radius: 4px;

    background: #f4f6f9;
    color: #333;

    font-family:
        "Roboto Mono",
        "Courier New",
        monospace;

    font-size: 0.91em;
    line-height: inherit;

    overflow-wrap: anywhere;
}


/* =========================================================
   TEXT EXAMPLES
   ========================================================= */

.text-repeater-example {
    width: 100%;
    min-width: 0;

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

    border: 1px solid #dce2e9;
    border-radius: 9px;

    background: #f8fafc;

    overflow: hidden;
}

.text-repeater-example pre {
    display: block;

    width: 100%;

    margin: 0;
    padding: 16px 18px;

    background: transparent;
    color: #333;

    font-family:
        "Roboto Mono",
        "Courier New",
        monospace;

    font-size: 14px;
    line-height: 1.7;
    font-weight: 400;

    white-space: pre-wrap;
    overflow-wrap: anywhere;

    overflow-x: auto;
}

.text-repeater-example pre code {
    padding: 0;
    border: 0;

    background: none;
    color: inherit;

    font: inherit;

    white-space: inherit;
}


/* =========================================================
   EXAMPLE TABLE WRAPPER
   ========================================================= */

.text-repeater-table-wrapper {
    width: 100%;
    max-width: 100%;

    margin: 16px 0 20px;

    border: 1px solid #dce2e9;
    border-radius: 9px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    background: #fff;
}


/* =========================================================
   EXAMPLE TABLE
   ========================================================= */

.text-repeater-example-table {
    width: 100%;

    margin: 0;

    border-collapse: collapse;
    border-spacing: 0;

    background: #fff;
    color: #333;

    font-size: 14px;
    line-height: 1.55;
}

.text-repeater-example-table thead {
    background: #f3f7fc;
}

.text-repeater-example-table th {
    padding: 12px 14px;

    border-bottom: 1px solid #dce2e9;

    color: #333;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;

    text-align: left;
    vertical-align: middle;
}

.text-repeater-example-table td {
    padding: 12px 14px;

    border-bottom: 1px solid #edf0f4;

    font-size: 14px;
    line-height: 1.6;

    text-align: left;
    vertical-align: top;

    overflow-wrap: break-word;
}

.text-repeater-example-table tbody tr:last-child td {
    border-bottom: 0;
}

.text-repeater-example-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.text-repeater-example-table th:first-child,
.text-repeater-example-table td:first-child {
    width: 32%;
}

.text-repeater-example-table td code {
    white-space: normal;
    overflow-wrap: anywhere;
}


/* =========================================================
   FAQ ITEMS
   ========================================================= */

.text-repeater-faq-item {
    width: 100%;

    margin: 0;
    padding: 19px 0;

    border-bottom: 1px solid #e6e9ed;
}

.text-repeater-faq-item:first-of-type {
    padding-top: 4px;
}

.text-repeater-faq-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.text-repeater-faq-item h3 {
    margin: 0 0 9px;
    padding: 0;

    color: #333;

    font-size: 18px;
    line-height: 1.45;
    font-weight: 700;
}

.text-repeater-faq-item p {
    margin: 0;
    padding: 0;

    font-size: 15px;
    line-height: 1.7;
}


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

.text-repeater-related {
    margin-top: 37px;
}

.text-repeater-related-intro {
    margin-bottom: 17px !important;
}


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

.text-repeater-related-links {
    display: grid;

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

    gap: 10px 20px;

    width: 100%;

    margin: 0 0 23px;
    padding: 0;

    list-style: none;
}

.text-repeater-related-links li {
    position: relative;

    min-width: 0;

    margin: 0;
    padding: 0 0 0 18px;

    font-size: 15px;
    line-height: 1.55;
}

.text-repeater-related-links li::before {
    content: "";

    position: absolute;

    left: 0;
    top: 10px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #1a73e8;
}

.text-repeater-related-links a {
    color: #1155cc;

    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
}

.text-repeater-related-links a:hover {
    text-decoration: underline;
}


/* =========================================================
   RELATED TOOL CALLOUTS
   ========================================================= */

.text-repeater-related-callouts {
    display: grid;

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

    gap: 15px;

    width: 100%;

    margin: 0;
    padding: 0;
}

.text-repeater-related-callout {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 17px 18px;

    border: 1px solid #dce2e9;
    border-radius: 9px;

    background: #f8fafc;
}

.text-repeater-related-callout h3 {
    margin: 0 0 9px;

    color: #333;

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

.text-repeater-related-callout p {
    margin: 0;

    color: #555;

    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media screen and (min-width: 1400px) {

    .text-repeater-layout {
        max-width: 1250px;
    }

    .text-repeater-generator-grid {
        gap: 22px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        padding: 20px;
    }

}


/* =========================================================
   MEDIUM DESKTOP

   Keep the 300px sidebar.
   ========================================================= */

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

    .text-repeater-layout {
        gap: 22px;
    }

    .text-repeater-generator-grid {
        gap: 15px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        padding: 15px;
    }

    .text-repeater-stats {
        gap: 7px;
    }

    .text-repeater-stat {
        padding: 10px 5px;
    }

    .text-repeater-stat-value {
        font-size: 21px;
    }

    .text-repeater-stat-label {
        font-size: 11px;
    }

}


/* =========================================================
   SMALL DESKTOP

   Sidebar remains visible until 900px.
   ========================================================= */

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

    .text-repeater-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .text-repeater-layout {
        gap: 18px;
    }

    .text-repeater-generator-grid {
        gap: 12px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        padding: 13px;
    }

    .text-repeater-section-heading h2 {
        font-size: 19px;
    }

    .text-repeater-presets {
        gap: 6px;
    }

    .text-repeater-preset {
        min-width: 45px;

        padding: 8px 9px;

        font-size: 13px;
    }

    .text-repeater-stat-value {
        font-size: 19px;
    }

    .text-repeater-stat-label {
        font-size: 10px;
    }

}


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

   Sidebar hidden below 900px.
   Main content becomes full width.
   ========================================================= */

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

    .text-repeater-layout {
        display: block;

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

        margin: 0 auto;
    }

    .text-repeater-main {
        width: 100%;
    }

    .text-repeater-sidebar {
        display: none !important;
    }

    .text-repeater-generator-grid {
        grid-template-columns:
            minmax(0, 0.95fr)
            minmax(0, 1.15fr);

        gap: 16px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        padding: 18px;
    }

    .text-repeater-stat-value {
        font-size: 22px;
    }

    .text-repeater-stat-label {
        font-size: 12px;
    }

}


/* =========================================================
   NARROW TABLETS

   Stack main tool sections.

   Order:
   1. Your Text
   2. Repeat Settings
   3. Repeated Text
   ========================================================= */

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

    .text-repeater-page {
        padding: 92px 15px 40px;
    }

    .text-repeater-heading {
        margin-bottom: 20px;
    }

    .text-repeater-heading h1 {
        font-size: 29px;
    }

    .text-repeater-intro {
        font-size: 15px;
        line-height: 1.55;
    }

    .text-repeater-generator-grid {
        display: flex;
        flex-direction: column;

        gap: 17px;
    }

    .text-repeater-left-column {
        width: 100%;
        gap: 17px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        width: 100%;
        padding: 17px;
    }

    .text-repeater-section-heading h2 {
        font-size: 20px;
    }

    .text-repeater-page .text-repeater-input {
        height: 150px;
    }

    .text-repeater-page .text-repeater-output {
        height: 290px;
        min-height: 190px;
    }

    .text-repeater-presets {
        gap: 8px;
    }

    .text-repeater-preset {
        min-width: 55px;
        min-height: 42px;

        font-size: 14px;
    }

    .text-repeater-stat-value {
        font-size: 23px;
    }

    .text-repeater-stat-label {
        font-size: 12px;
    }

    .text-repeater-article h2 {
        font-size: 23px;
    }

    .text-repeater-article h3 {
        font-size: 18px;
    }

}


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

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

    .text-repeater-page {
        padding: 88px 12px 35px;
    }

    .text-repeater-heading {
        margin-bottom: 18px;
    }

    .text-repeater-heading h1 {
        font-size: 27px;
        line-height: 1.3;
    }

    .text-repeater-intro {
        font-size: 14px;
        line-height: 1.6;
    }

    .text-repeater-tool {
        gap: 13px;
        margin-bottom: 32px;
    }

    .text-repeater-generator-grid {
        gap: 15px;
    }

    .text-repeater-left-column {
        gap: 15px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        padding: 15px;

        border-radius: 9px;
    }

    .text-repeater-input-panel {
        gap: 11px;
    }

    .text-repeater-options {
        gap: 17px;
    }

    .text-repeater-results {
        gap: 13px;
    }

    .text-repeater-section-heading h2 {
        font-size: 19px;
    }

    .text-repeater-page .text-repeater-input {
        height: 145px;
        min-height: 105px;

        padding: 12px 12px 53px;

        font-size: 15px;
    }

    .text-repeater-page .text-repeater-output {
        height: 260px;
        min-height: 180px;

        /* Normal mobile padding */
        padding: 12px;

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

    .text-repeater-number-input,
    .text-repeater-select,
    .text-repeater-text-input {
        min-height: 45px;
        font-size: 15px;
    }

    .text-repeater-presets {
        gap: 7px;
    }

    .text-repeater-preset {
        min-width: 49px;
        min-height: 41px;

        padding: 8px 10px;

        font-size: 14px;
    }

    .text-repeater-stats {
        gap: 7px;
    }

    .text-repeater-stat {
        min-height: 76px;
        padding: 10px 5px;
    }

    .text-repeater-stat-value {
        font-size: 21px;
    }

    .text-repeater-stat-label {
        font-size: 11px;
    }

    .text-repeater-secondary-button {
        min-height: 40px;
    }

    .text-repeater-article {
        font-size: 15px;
        line-height: 1.75;
    }

    .text-repeater-article-section {
        margin-bottom: 28px;
    }

    .text-repeater-article h2 {
        font-size: 21px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    .text-repeater-article h3 {
        font-size: 17px;
        line-height: 1.45;
    }

    .text-repeater-article p {
        font-size: 15px;
        line-height: 1.75;
    }

    .text-repeater-article-list {
        padding-left: 22px;

        font-size: 15px;
    }

    .text-repeater-article-list li {
        padding-left: 2px;
    }

    .text-repeater-example pre {
        padding: 14px;

        font-size: 13px;
    }

    .text-repeater-example-table th,
    .text-repeater-example-table td {
        padding: 10px 11px;
        font-size: 13px;
    }

    .text-repeater-faq-item {
        padding: 16px 0;
    }

    .text-repeater-faq-item h3 {
        font-size: 16px;
    }

    .text-repeater-faq-item p {
        font-size: 14px;
    }

    .text-repeater-related-links {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .text-repeater-related-links li,
    .text-repeater-related-links a {
        font-size: 14px;
    }

    .text-repeater-related-callouts {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .text-repeater-related-callout {
        padding: 15px;
    }

    .text-repeater-related-callout h3 {
        font-size: 16px;
    }

    .text-repeater-related-callout p {
        font-size: 14px;
    }

}


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

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

    .text-repeater-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .text-repeater-heading h1 {
        font-size: 25px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        padding: 12px;
    }

    .text-repeater-section-heading h2 {
        font-size: 18px;
    }

    .text-repeater-presets {
        gap: 6px;
    }

    .text-repeater-preset {
        min-width: 45px;
        padding: 8px;
        font-size: 13px;
    }

    .text-repeater-stats {
        gap: 5px;
    }

    .text-repeater-stat {
        padding: 9px 4px;
    }

    .text-repeater-stat-value {
        font-size: 18px;
    }

    .text-repeater-stat-label {
        font-size: 10px;
    }

    .text-repeater-article h2 {
        font-size: 20px;
    }

}


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

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

    .text-repeater-page *,
    .text-repeater-page *::before,
    .text-repeater-page *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}


/* =========================================================
   PRINT STYLES
   ========================================================= */

@media print {

    .text-repeater-page {
        padding: 20px 0;
    }

    .text-repeater-layout {
        display: block;
        max-width: none;
    }

    .text-repeater-sidebar {
        display: none !important;
    }

    .text-repeater-generator-grid {
        display: block;
    }

    .text-repeater-left-column {
        margin-bottom: 15px;
    }

    .text-repeater-input-panel,
    .text-repeater-options,
    .text-repeater-results {
        break-inside: avoid;
        margin-bottom: 15px;
    }

    .text-repeater-page textarea {
        resize: none !important;
    }

    .text-repeater-input-actions,
    .text-repeater-output-actions,
    .text-repeater-result-actions {
        display: none !important;
    }

    .text-repeater-article a {
        color: #000;
    }

}
