
/* ============================================================
   CASE CONVERTER
   case-converter.css
   Page-specific styles
   ============================================================ */


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

html {
    margin: 0;
    padding: 0;
    border: none;
    font-family: Arial, sans-serif;
}

.case-converter-page {
    width: 100%;
    padding: 105px 15px 30px;
    color: #333;
    font-family: Arial, sans-serif;
}

.case-converter-page *,
.case-converter-page *::before,
.case-converter-page *::after {
    box-sizing: border-box;
}

.case-converter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.case-converter-main {
    min-width: 0;
}

.case-converter-tool-section {
    width: 100%;
    min-width: 0;
}

.case-converter-page button,
.case-converter-page textarea,
.case-converter-page input,
.case-converter-page select {
    font-family: Arial, sans-serif;
}

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

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


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

.case-converter-heading {
    margin-bottom: 22px;
    text-align: center;
}

.case-converter-heading h1 {
    margin: 0 0 10px;
    padding: 0;
    color: #333;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
}

.case-converter-intro {
    max-width: 720px;
    margin: 0 auto;
    color: #555;
    font-size: 17px;
    line-height: 1.55;
}


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

.case-converter-input-section {
    width: 100%;
    min-width: 0;
}

.case-converter-page .textarea-column-title {
    display: block;
    margin: 0 0 7px;
    color: #444;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
}


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

.case-converter-textarea-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
}


/* ============================================================
   MAIN TEXTAREA
   ============================================================ */

#caseInput {
    display: block;
    width: 100%;
    max-width: 100%;

    height: 300px;

    /*
       Allow the user to resize the textarea
       down to approximately one line.
    */

    min-height: 52px;

    margin: 0;

    /*
       Extra bottom padding prevents text
       from appearing underneath the buttons
       at normal textarea heights.
    */

    padding: 17px 18px 72px;

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

    background: #fff;
    color: #222;

    outline: none;

    resize: vertical;

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

    font-family: "Anonymous Pro", monospace;
    font-size: 15px;
    line-height: 1.55;

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

#caseInput:hover {
    border-color: #aeb4bd;
}

#caseInput:focus {
    border-color: #5f6368;
    box-shadow: 0 0 0 2px rgba(95, 99, 104, 0.08);
}

#caseInput::placeholder {
    color: #8a8f98;
    opacity: 1;
}


/* ============================================================
   TEXTAREA RESIZE HANDLE
   ============================================================ */

/*
   Keep the browser's native textarea resize handle.

   The action buttons sit slightly above and to
   the left of the bottom-right resize corner.
*/

#caseInput::-webkit-resizer {
    background-color: transparent;
}


/* ============================================================
   TEXTAREA ACTION BUTTONS
   ============================================================ */

.case-converter-textarea-actions {
    position: absolute;

    right: 22px;
    bottom: 15px;

    z-index: 2;

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

    flex-wrap: nowrap;

    gap: 8px;

    width: auto;
    margin: 0;
}


/* ============================================================
   ACTION BUTTON BASE
   ============================================================ */

.case-converter-page .case-converter-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    gap: 7px;

    min-width: 80px;
    min-height: 36px;

    margin: 0;
    padding: 8px 12px;

    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 6px;

    color: #333;

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

    text-align: center;
    white-space: nowrap;

    cursor: pointer;

    user-select: none;
    -webkit-tap-highlight-color: transparent;

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

.case-converter-action-button i {
    font-size: 15px;
    line-height: 1;
    font-weight: normal;
}

.case-converter-page .case-converter-action-button:hover {
    text-decoration: none;
}

.case-converter-action-button:active:not(:disabled) {
    transform: translateY(1px);
}

.case-converter-action-button:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}


/* ============================================================
   UNDO BUTTON
   ============================================================ */

.case-converter-page .undo-button {
    background: #f3f4f6;
    border-color: #cdd2d8;
    color: #444;
}

.case-converter-page .undo-button:hover:not(:disabled) {
    background: #e7eaee;
    border-color: #aeb6bf;
}

.case-converter-page .undo-button:disabled {
    background: #f5f5f5;
    border-color: #e1e3e6;
    color: #aaa;

    cursor: not-allowed;
    opacity: 0.75;

    transform: none;
}


/* ============================================================
   CLEAR BUTTON
   ============================================================ */

.case-converter-page .clear-button {
    background: #f3f4f6;
    border-color: #cdd2d8;
    color: #444;
}

.case-converter-page .clear-button:hover:not(:disabled) {
    background: #e7eaee;
    border-color: #aeb6bf;
}

.case-converter-page .clear-button:disabled {
    background: #f5f5f5;
    border-color: #e1e3e6;
    color: #aaa;

    cursor: not-allowed;
    opacity: 0.75;

    transform: none;
}


/* ============================================================
   COPY BUTTON
   ============================================================ */

.case-converter-page .copy-button {
    background: #287a38;
    border-color: rgba(0, 0, 0, 0.08);
    color: #fff !important;
}

.case-converter-page .copy-button:hover:not(:disabled) {
    background: #216b30;
    color: #fff !important;
}

.case-converter-page .copy-button.copied,
.case-converter-page .copy-button.is-copied {
    background: #245f30;
    color: #fff !important;
}

.case-converter-page .copy-button:disabled {
    background: #94b99b;
    color: #fff !important;

    cursor: not-allowed;
    opacity: 0.7;

    transform: none;
}

#copyButtonText {
    display: inline-block;
}


/* ============================================================
   COMPACT TEXTAREA
   ============================================================ */

/*
   This class is applied by JavaScript when the
   textarea height becomes less than 120px.

   The textarea can still shrink to 52px.

   At compact heights, the action buttons move below
   the textarea so they cannot obscure the text.
*/

.case-converter-textarea-wrapper.is-compact #caseInput {
    padding-top: 12px;
    padding-bottom: 12px;
}

.case-converter-textarea-wrapper.is-compact
.case-converter-textarea-actions {
    position: static;

    right: auto;
    bottom: auto;

    width: 100%;

    margin-top: 8px;

    justify-content: flex-end;
}


/* ============================================================
   TEXT STATISTICS
   ============================================================ */

.case-converter-text-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    flex-wrap: wrap;

    gap: 8px 22px;

    width: 100%;
    margin-top: 9px;
}

.case-converter-text-stat {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    min-width: 0;

    color: #555;

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

.case-converter-stat-label {
    color: #666;
    font-weight: 400;
}

.case-converter-stat-value {
    color: #1a73e8;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


/* ============================================================
   CONVERSION CONTROLS
   ============================================================ */

.case-converter-controls {
    width: 100%;
    min-width: 0;

    margin-top: 23px;
}

.case-converter-controls-title {
    margin: 0 0 11px;
    padding: 0;

    color: #444;

    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}


/* ============================================================
   CONVERSION BUTTON GRID
   ============================================================ */

.case-converter-buttons {
    display: grid;

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

    gap: 10px;

    width: 100%;
}

.case-converter-button {
    display: flex;
    align-items: center;
    justify-content: center;

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

    margin: 0;
    padding: 11px 10px;

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

    background: #f7f8fa;
    color: #333;

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

    text-align: center;
    overflow-wrap: anywhere;

    cursor: pointer;

    user-select: none;
    -webkit-tap-highlight-color: transparent;

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

.case-converter-button:hover {
    border-color: #90b5ee;
    background: #edf4ff;
    color: #1558b0;
}

.case-converter-button:active {
    background: #dceaff;
    transform: translateY(1px);
}

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

.case-converter-button:disabled {
    background: #f4f4f4;
    border-color: #e0e0e0;
    color: #999;

    cursor: not-allowed;

    transform: none;
}


/* ============================================================
   ACTIVE CONVERSION BUTTON
   ============================================================ */

.case-converter-button.is-active,
.case-converter-button.active,
.case-converter-button[aria-pressed="true"] {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1558b0;
}

.case-converter-button.is-active:hover,
.case-converter-button.active:hover,
.case-converter-button[aria-pressed="true"]:hover {
    background: #dce9ff;
}


/* ============================================================
   TOOL RECOMMENDATION
   ============================================================ */

.case-converter-page .tool-recommendation {
    width: 100%;

    margin-top: 23px;
    padding: 14px 16px;

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

    background: #f7faff;
}

.case-converter-page .tool-recommendation p {
    margin: 0;

    color: #444;

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

.case-converter-page .tool-recommendation strong {
    color: #333;
}

.case-converter-page .tool-recommendation a strong {
    color: inherit;
}


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

.case-converter-content {
    width: 100%;

    margin-top: 34px;

    color: #333;

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

.case-converter-content h2 {
    margin: 34px 0 12px;
    padding: 0;

    color: #292929;

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

.case-converter-content > h2:first-child {
    margin-top: 0;
}

.case-converter-content h3 {
    margin: 26px 0 9px;
    padding: 0;

    color: #333;

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

.case-converter-content p {
    margin: 0 0 17px;
    padding: 0;

    color: #444;

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

.case-converter-content strong {
    color: #333;
}

.case-converter-content a strong {
    color: inherit;
}

.case-converter-content em {
    color: #444;
}

.case-converter-content ol,
.case-converter-content ul {
    margin: 8px 0 20px 28px;
    padding: 0;

    color: #444;

    list-style-position: outside;
}

.case-converter-content ol {
    list-style-type: decimal;
}

.case-converter-content ul {
    list-style-type: disc;
}

.case-converter-content li {
    margin-bottom: 8px;
    padding-left: 3px;

    color: #444;

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

.case-converter-content ol li {
    list-style: decimal;
}

.case-converter-content ul li {
    list-style: disc;
}


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

.case-converter-content .related-tools-list {
    margin-top: 10px !important;
}

.case-converter-content .related-tools-list li {
    margin-bottom: 9px;
}


/* ============================================================
   FAQ SECTION
   ============================================================ */

.case-converter-content .faq-section {
    margin-top: 38px;
}

.case-converter-content .faq-section > h2 {
    margin-bottom: 16px;
}

.case-converter-content .faq-item {
    padding: 17px 0;

    border-bottom: 1px solid #e1e4e8;
}

.case-converter-content .faq-item:first-of-type {
    border-top: 1px solid #e1e4e8;
}

.case-converter-content .faq-item h3 {
    margin: 0 0 8px;

    color: #333;

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

.case-converter-content .faq-item p {
    margin: 0;
}


/* ============================================================
   BOTTOM TOOL LINK
   ============================================================ */

.case-converter-content .bottom-tool-link {
    margin-top: 28px;
    padding: 15px 17px;

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

    background: #f7faff;
}

.case-converter-content .bottom-tool-link p {
    margin: 0;
}


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

.case-converter-layout > #sidebar {
    width: 300px;
    min-width: 300px;
    min-height: 600px;
}


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

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

    .case-converter-buttons {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 10px;
    }

    #caseInput {
        height: 300px;
        min-height: 52px;
    }

}


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

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

    .case-converter-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .case-converter-layout {
        gap: 24px;
    }

    .case-converter-heading h1 {
        font-size: 30px;
    }

    .case-converter-intro {
        font-size: 16px;
    }

    #caseInput {
        height: 285px;
        min-height: 52px;
    }

    .case-converter-buttons {
        gap: 8px;
    }

    .case-converter-button {
        min-height: 46px;
        padding: 10px 8px;
        font-size: 13px;
    }

    .case-converter-content {
        font-size: 16px;
    }

    .case-converter-content p,
    .case-converter-content li {
        font-size: 16px;
    }

    .case-converter-content h2 {
        font-size: 23px;
    }

    .case-converter-content h3 {
        font-size: 19px;
    }

}


/* ============================================================
   SIDEBAR BREAKPOINT
   ============================================================ */

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

    .case-converter-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 900px;
        gap: 0;
    }

    .case-converter-layout > #sidebar {
        display: none;
    }

    .case-converter-page {
        padding-top: 100px;
    }

    #caseInput {
        height: 285px;
        min-height: 52px;
    }

}


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

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

    .case-converter-heading h1 {
        font-size: 29px;
    }

    .case-converter-intro {
        font-size: 16px;
    }

    #caseInput {
        height: 260px;
        min-height: 52px;
    }

    .case-converter-buttons {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 9px;
    }

    .case-converter-button {
        min-height: 45px;
        font-size: 13px;
    }

    .case-converter-content h2 {
        font-size: 23px;
    }

}


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

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

    .case-converter-page {
        padding-top: 92px;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 25px;
    }


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

    .case-converter-heading {
        margin-bottom: 18px;
    }

    .case-converter-heading h1 {
        margin-bottom: 8px;
        font-size: 27px;
    }

    .case-converter-intro {
        font-size: 15px;
        line-height: 1.5;
    }


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

    .case-converter-page .textarea-column-title {
        margin-bottom: 6px;
        font-size: 13px;
    }

    #caseInput {
        height: 235px;
        min-height: 52px;

        padding: 14px 13px 66px;

        border-radius: 8px;

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


    /* ========================================================
       TEXTAREA ACTION BUTTONS
       ======================================================== */

    .case-converter-textarea-actions {
        right: 19px;
        bottom: 13px;

        gap: 7px;
    }

    .case-converter-page .case-converter-action-button {
        min-width: 72px;
        min-height: 34px;

        padding: 7px 10px;

        border-radius: 6px;

        font-size: 12px;
    }

    .case-converter-action-button i {
        font-size: 14px;
    }


    /* ========================================================
       COMPACT TEXTAREA
       ======================================================== */

    .case-converter-textarea-wrapper.is-compact #caseInput {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .case-converter-textarea-wrapper.is-compact
    .case-converter-textarea-actions {
        position: static;

        right: auto;
        bottom: auto;

        width: 100%;

        margin-top: 8px;

        justify-content: flex-end;
    }


    /* ========================================================
       TEXT STATISTICS
       ======================================================== */

    .case-converter-text-stats {
        gap: 7px 18px;
        margin-top: 8px;
    }

    .case-converter-text-stat {
        gap: 4px;
        font-size: 12px;
    }


    /* ========================================================
       CONVERSION CONTROLS
       ======================================================== */

    .case-converter-controls {
        margin-top: 20px;
    }

    .case-converter-controls-title {
        margin-bottom: 10px;
        font-size: 15px;
    }

    .case-converter-buttons {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }

    .case-converter-button {
        min-height: 43px;

        padding: 9px 7px;

        border-radius: 6px;

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


    /* ========================================================
       RECOMMENDATION
       ======================================================== */

    .case-converter-page .tool-recommendation {
        margin-top: 18px;
        padding: 12px 13px;
    }

    .case-converter-page .tool-recommendation p {
        font-size: 14px;
    }


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

    .case-converter-content {
        margin-top: 28px;
    }

    .case-converter-content h2 {
        margin-top: 29px;
        font-size: 22px;
    }

    .case-converter-content h3 {
        margin-top: 22px;
        font-size: 18px;
    }

    .case-converter-content p,
    .case-converter-content li {
        font-size: 16px;
        line-height: 1.65;
    }

    .case-converter-content ol,
    .case-converter-content ul {
        margin-left: 23px;
    }

    .case-converter-content .faq-section {
        margin-top: 32px;
    }

    .case-converter-content .faq-item {
        padding: 15px 0;
    }

    .case-converter-content .faq-item h3 {
        font-size: 17px;
    }

    .case-converter-content .bottom-tool-link {
        padding: 13px 14px;
    }

}


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

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

    .case-converter-page {
        padding-left: 8px;
        padding-right: 8px;
    }

    .case-converter-heading h1 {
        font-size: 26px;
    }

    .case-converter-intro {
        font-size: 14px;
    }

    #caseInput {
        height: 225px;
        min-height: 52px;

        font-size: 15px;
    }

    .case-converter-textarea-actions {
        right: 18px;
        bottom: 12px;

        gap: 6px;
    }

    .case-converter-page .case-converter-action-button {
        min-width: 67px;

        padding: 7px 8px;

        font-size: 12px;
    }

    .case-converter-action-button i {
        font-size: 13px;
    }

    .case-converter-buttons {
        gap: 6px;
    }

    .case-converter-button {
        min-height: 42px;

        padding: 8px 5px;

        font-size: 12px;
    }

    .case-converter-content h2 {
        font-size: 21px;
    }

}


/* ============================================================
   EXTRA NARROW SCREENS
   ============================================================ */

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

    .case-converter-buttons {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .case-converter-textarea-actions {
        gap: 4px;
    }

    .case-converter-page .case-converter-action-button {
        min-width: 0;

        padding-left: 6px;
        padding-right: 6px;

        font-size: 11px;
    }

    .case-converter-action-button i {
        font-size: 12px;
    }

}


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

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

    #caseInput,
    .case-converter-button,
    .case-converter-action-button {
        transition: none;
    }

    .case-converter-button:active,
    .case-converter-action-button:active {
        transform: none;
    }

}
