.sf-pretty-response {
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}



.sf-pretty-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #222;
}

.sf-pretty-intro {
  margin: 0 0 12px 0;
  color: #333;
}

.sf-pretty-section {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fafafa;
}

.sf-pretty-section-heading {
  font-weight: 600;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.sf-pretty-section-body {
  color: #333;
  white-space: pre-wrap;
}

.sf-pretty-next-question {
  margin-top: 12px;
  padding: 8px;
  background: #f0f7ff;
  border-left: 3px solid #2b86ff;
  border-radius: 4px;
  color: #0b69ff;
  font-weight: 600;
}

.sf-token-usage {
  margin-top: 8px;
  color: blue;
  font-size: 0.95rem;
  white-space: pre-wrap;
}


/* Make <strong> more prominent inside pretty responses */
.sf-pretty-response strong,
.sf-pretty-section-heading strong,
.sf-pretty-title strong,
.sf-pretty-intro strong,
.sf-pretty-next-question strong {
  font-weight: 600;      /* heavier weight */
  font-size: 1.01em;     /* slightly larger than surrounding text */
  color: green;           /* optional: darker color color: #111; */
  line-height: 1.2;
}


/*
 * ask-openai-sf.css
 * Shared CSS for:
 * - normal ask-gpt page
 * - modal ask-gpt popup
 * - future Gutenberg block
 */


/* =========================================================
   Main component
   ========================================================= */

.ask-openai-sf {
    box-sizing: border-box;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;

    font-family: Manrope, Arial, sans-serif;
    color: #0f172a;
    background: #ffffff;

    border: 1px solid #dbe3ef;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.ask-openai-sf * {
    box-sizing: border-box;
}


/* =========================================================
   Response area
   ========================================================= */

.ask-openai-sf__response {
    min-height: 220px;
    max-height: 420px;
    overflow-y: auto;

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

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

    color: #111827;
    background: #f8fafc;

    border: 1px solid #dbe3ef;
    border-radius: 14px;
}

.ask-openai-sf__response strong {
    font-weight: 800;
}


/* =========================================================
   Input
   ========================================================= */

.ask-openai-sf__input {
    display: block;
    width: 100%;
    min-height: 90px;
    resize: vertical;

    padding: 14px 16px;
    margin-bottom: 14px;

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

    color: #0f172a;
    background: #ffffff;

    border: 1px solid #cbd5e1;
    border-radius: 14px;
    outline: none;
}

.ask-openai-sf__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}


/* =========================================================
   Button
   ========================================================= */

.ask-openai-sf__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 130px;
    min-height: 44px;

    padding: 10px 22px;
    margin-bottom: 16px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    color: #ffffff;
    background: #2563eb;

    border: 1px solid #2563eb;
    border-radius: 999px;
    cursor: pointer;

    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.ask-openai-sf__button:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.ask-openai-sf__button:disabled {
    cursor: wait;
    opacity: 0.65;
}


/* #helpbutton: Gutenberg button block wrapper — glass pill style */
#helpbutton {
    display: inline-flex !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 !important;
}

/* inner button — reset WordPress/theme styles so glass shows through */
#helpbutton a,
#helpbutton button,
#helpbutton .wp-block-button__link,
#helpbutton .wp-element-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 30px !important;
    padding: 5px 34px !important;
    border-radius: 999px !important;
    border: none !important;
    background: transparent !important;
    color: black !important;
    font-weight: 500 !important;
    font-size: 25px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

#helpbutton:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.9),
        0 6px 16px rgba(0, 0, 0, 0.35) !important;
}

#helpbutton:active {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(5px);
}

.btnmodal-apple-glass {
    /*width: 10%;*/
    min-width: 30px;
    min-height:50px;

    padding: 18px 24px;

    border-radius: 999px; /* full rounded ends */

    border: 1px solid rgba(255, 255, 255, 0.4);

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: white;
    font-weight: 500;
    font-size:25px;

    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.25);

    cursor: pointer;
  
}
.btnmodal-apple-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.6),
        0 6px 16px rgba(0, 0, 0, 0.35);
        transition: all 0.2s ease;
}
.btnmodal-apple-glass:active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow:
        inset 0 3px 6px rgba(0, 0, 0, 0.25);
    transform: translateY(5px);
}

.btnmodal-apple-glass:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}




/* =========================================================
   Tokens and costs
   ========================================================= */

.ask-openai-sf__tokens,
.ask-openai-sf__costs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 8px;

    font-size: 13px;
    color: #475569;
}

.ask-openai-sf__tokens span,
.ask-openai-sf__costs div {
    padding: 6px 10px;

    background: #f1f5f9;

    border: 1px solid #e2e8f0;
    border-radius: 999px;
}





/* =========================================================
   Modal container
   ========================================================= */



.ask-gpt-modal {  /* all the page */
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ask-gpt-modal.is-hidden {
    display: none;
}

.ask-gpt-modal-box {  /* modal form */
    width: min(60%, calc(100vw - 40px));
    max-width: 900px;
    min-height: 600px;
    color: #fff;
    background: black;
    border-radius: 18px;
    
    
    font-family: Manrope, Arial, sans-serif;
    
    box-shadow: 15px 17px 37px 20px #f4e58a;
}

.ask-gpt-close {
    float: right;
    margin: 12px 12px 0 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    height: 36px;
    padding: 0 12px;

    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ask-gpt-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.ask-gpt-close-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.ask-gpt-title {
    margin: 20px 20px 20px 20px;
    font-size: 26px;
    font-weight: 700;
    color: red;
}

.ask-gpt-question {
    display:block;
    font-family: Manrope, Arial, sans-serif;
    color:black;
    
    width: calc(100% - 80px);
    margin-left: 40px;
    margin-right: 40px;
    overflow-y: auto;
    box-sizing: border-box;
    border-radius: 8px;

    padding: 14px;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    /* Initial height equal to ~4 text lines (includes vertical padding) */
    height: calc(1.5em * 4 + 28px);
    max-height: 320px;

    /* Enable vertical scrolling when content exceeds the box */
    
}

.ask-gpt-send {
    display: block;
    margin: 14px auto 0;
    padding: 10px 18px;
    cursor: pointer;
}

.ask-gpt-response {
    display:block;
    font-family: Manrope, Arial, sans-serif;
    background-color: white;
    width: calc(100% - 80px);
    min-height: 400px;
    margin-left: 40px;
    margin-right: 40px;
    margin-top: 30px;
    overflow-y: auto;
    box-sizing: border-box;
    border-radius: 8px;

    padding: 14px;
    font-size: 20px;
    line-height: 1.2;
    resize: vertical;
    /* Initial height equal to ~4 text lines (includes vertical padding) */
    height: 70%;
    max-height: 320px;
}


.ask-gpt-token-line {
    margin-top: 16px;
    font-size: 14px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 40px;
}

.ask-gpt-cost {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    padding: 0 40px;
}




.btn-apple-glass {
    /*width: 10%;*/
    min-width: 30px;
    min-height:50px;

    padding: 18px 24px;

    border-radius: 999px; /* full rounded ends */

    border: 1px solid rgba(255, 255, 255, 0.4);

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: white !important;
    font-weight: 500;
    font-size:25px;

    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.25);

    cursor: pointer;
  
}
.btn-apple-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 2px 2px rgba(255, 255, 255, 0.6),
        0 6px 16px rgba(0, 0, 0, 0.35);
        transition: all 0.2s ease;
}
.btn-apple-glass:active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow:
        inset 0 3px 6px rgba(0, 0, 0, 0.25);
    transform: translateY(5px);
}

.btn-apple-glass:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}


/*
.ask-openai-sf-modal[hidden] {
    display: none;
}

.ask-openai-sf-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

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

    padding: 24px;
}

.ask-openai-sf-modal__overlay {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(5px);
}

.ask-openai-sf-modal__box {
    position: relative;
    z-index: 1;

    width: min(960px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;

    padding: 18px;

    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.ask-openai-sf-modal__body {
    width: 100%;
}



.ask-openai-sf-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;

    padding: 8px 16px;
    margin: 0 0 12px auto;

    font-family: Manrope, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;

    color: #0f172a;
    background: #f8fafc;

    border: 1px solid #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
}

.ask-openai-sf-modal__close:hover {
    background: #e2e8f0;
}




#apiAskButtonUI{
    background-color: darkviolet;
    color: white;
    border-width: 0px;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
}

#userInputUI{
    background-color: yellow;
    color: blacl;
    border-width: 0px;
    
    padding: 12px 22px;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
}
*/



/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {
    .ask-openai-sf-modal {
        padding: 10px;
        align-items: stretch;
    }

    .ask-openai-sf-modal__box {
        max-height: calc(100vh - 20px);
        padding: 12px;
        border-radius: 18px;
    }

    .ask-openai-sf {
        padding: 16px;
        border-radius: 16px;
    }

    .ask-openai-sf__response {
        min-height: 180px;
        max-height: 360px;
        font-size: 15px;
    }

    .ask-openai-sf__tokens,
    .ask-openai-sf__costs {
        display: block;
    }

    .ask-openai-sf__tokens span,
    .ask-openai-sf__costs div {
        display: block;
        width: fit-content;
        margin-bottom: 6px;
    }
}