/* Footer */
.footer {
    width: 100%;
}

/* Main page grid layout */
.parent-vowel {
    display: grid;
    grid-template-columns: 1fr 8fr 1fr 300px;
    grid-template-rows: 1fr;
    grid-column-gap: 2px;
    grid-row-gap: 2px;
}

.div1-vowel {
    grid-area: 1 / 1 / 2 / 2;
}

.div2-vowel {
    grid-area: 1 / 3 / 2 / 4;
}

.div3-vowel {
    grid-area: 1 / 2 / 2 / 3;
}

.sidebar {
    grid-area: 1 / 4 / 2 / 5;
}

.text {
    padding: 5px;
}

/* Base styles */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    margin: 0;
    padding: 0;

    min-height: 100vh;
    width: 100%;
}

/* Pronoun Finder container */
.vc-container {
    max-width: none;
    width: 100%;

    padding: 15px;
    margin-top: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;

    background: #ffffff;
}

.vc-title {
    font-size: 32px;
    color: #333;
    margin: 0;
    text-align: center;
    padding: 10px 0;
}

/* Top metric boxes */
.vc-counts {
    display: flex;
    justify-content: space-between;

    width: 100%;
    margin: 5px 0 15px;
}

.vc-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.vc-counts > div,
.vc-metric-box {
    flex: 1;

    text-align: center;
    border: 1px solid black;
    padding: 5px;
    box-sizing: border-box;

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vc-counts > div:not(:last-child),
.vc-metric-box:not(:last-child) {
    border-right: none;
}

.vc-counts > div > div:first-child,
.vc-metric-box > div:first-child {
    margin-bottom: 5px;

    font-size: 17px;
    font-weight: 500;
    color: #333;
}

.vc-counts > div > div:last-child,
.vc-metric-box > div:last-child {
    font-size: 40px;
    color: #1a73e8;
    font-weight: 600;
}

/* Input label */
.vc-input-label {
    width: 100%;
    display: block;

    margin: 5px 0 6px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Textarea */
.vc-textarea {
    width: 100%;
    height: 300px;

    border: 4px solid #ccc;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;

    padding: 10px;
    margin-bottom: 10px;
    margin-top: 5px;

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

    resize: vertical;
    box-sizing: border-box;

    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Shorter textarea for new layout */
.vc-textarea-short {
    height: 190px;
    min-height: 140px;
}

.vc-textarea:hover {
    border-color: #a9a9a9;
}

.vc-textarea:focus {
    outline: none;
    border-color: black;
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.2);
}

/* Section titles */
.vc-highlight-title,
.vc-pronoun-list-title {
    width: 100%;

    margin-top: 20px;
    margin-bottom: 8px;
    padding: 0 10px;

    font-size: 18px;
    font-weight: bold;
    color: #333;

    box-sizing: border-box;
}

/* Highlighted repeated text output */
.vc-highlighted-output {
    width: 100%;
    min-height: 120px;

    padding: 14px;

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

    background-color: #f9f9f9;
    color: #222;

    font-size: 17px;
    line-height: 1.7;

    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;

    box-sizing: border-box;
}

/* Individual highlighted pronouns inside repeated text */
.vc-pronoun-highlight {
    background-color: #fff3a3;
    border-bottom: 2px solid #f2c94c;
    border-radius: 3px;

    padding: 0 3px;

    font-weight: bold;
}

/* Pronoun frequency list */
.vc-pronoun-frequency-list {
    width: 100%;
    min-height: 90px;

    padding: 10px;

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

    background-color: #f9f9f9;

    box-sizing: border-box;
}

/* Each pronoun row generated by JS */
.vc-pronoun-frequency-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 12px;

    padding: 8px 10px;
    margin-bottom: 8px;

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

    background-color: #ffffff;

    font-size: 16px;
}

.vc-pronoun-frequency-item:last-child {
    margin-bottom: 0;
}

.vc-pronoun-word {
    font-weight: bold;
    color: #222;
}

.vc-pronoun-count {
    min-width: 34px;

    padding: 3px 8px;

    border-radius: 999px;

    background-color: #1a73e8;
    color: #ffffff;

    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

/* Optional support for old pronoun list class */
.vc-pronoun-list {
    margin-top: 20px;
    padding: 10px;

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

    background-color: #f9f9f9;

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

    overflow-y: auto;
    word-wrap: break-word;
    box-sizing: border-box;
}

/* Optional old count IDs, kept harmless in case another template references them */
#vc-vowelA,
#vc-vowelE,
#vc-vowelI,
#vc-vowelO,
#vc-vowelU {
    font-size: 20px;
}

#vc-wordCount,
#vc-characterCount {
    font-size: 30px;
}

/* Article/content styling */
.parent-vowel p {
    margin-bottom: 20px;

    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
}

.parent-vowel p a {
    color: #1a73e8;
}

.parent-vowel h2,
.parent-vowel h3 {
    margin-bottom: 20px;
}

/* Desktop width limit */
@media (min-width: 1200px) {
    .div3-vowel {
        max-width: 900px;
    }
}

/* Medium desktop/tablet with sidebar */
@media (max-width: 1200px) {
    .parent-vowel {
        display: grid;
        grid-template-columns: 1fr 300px;
        grid-template-rows: 1fr;
        grid-column-gap: 2px;
        grid-row-gap: 2px;
    }

    .div1-vowel {
        display: none;
    }

    .div2-vowel {
        display: none;
    }

    .div3-vowel {
        grid-area: 1 / 1 / 2 / 2;
    }

    .sidebar {
        grid-area: 1 / 2 / 2 / 3;
    }
}

/* Tablet and small screens */
@media (max-width: 992px) {
    .parent-vowel {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        grid-column-gap: 0;
        grid-row-gap: 0;
    }

    .div3-vowel {
        grid-area: 1 / 1 / 2 / 2;
    }

    .sidebar {
        display: none;
    }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .vc-container {
        padding: 15px;
    }

    .vc-title {
        font-size: 30px;
    }

    .vc-counts,
    .vc-metric-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .vc-counts > div,
    .vc-metric-box {
        border-top: 1px solid black;
        border-left: 1px solid black;
        border-right: 1px solid black;
        border-bottom: none;

        box-shadow: none;
    }

    .vc-counts > div:last-child,
    .vc-metric-box:last-child {
        border-bottom: 1px solid black;
    }

    .vc-counts > div:not(:last-child),
    .vc-metric-box:not(:last-child) {
        border-right: 1px solid black;
    }

    .vc-textarea {
        height: 250px;
    }

    .vc-textarea-short {
        height: 170px;
        min-height: 130px;
    }

    .vc-input-label,
    .vc-highlight-title,
    .vc-pronoun-list-title {
        font-size: 17px;
    }

    .vc-highlighted-output {
        min-height: 110px;
        font-size: 16px;
        line-height: 1.6;
    }

    .vc-pronoun-frequency-item {
        font-size: 15px;
        padding: 8px;
    }

    #vc-wordCount,
    #vc-characterCount {
        font-size: 30px;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .vc-container {
        padding: 10px;
    }

    .vc-title {
        font-size: 28px;
    }

    .vc-textarea {
        height: 180px;
    }

    .vc-textarea-short {
        height: 150px;
        min-height: 120px;
    }

    .text {
        padding: 5px;
    }

    .vc-highlighted-output,
    .vc-pronoun-frequency-list {
        padding: 10px;
    }

    .vc-pronoun-frequency-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .vc-pronoun-count {
        align-self: flex-start;
    }
}