/* =========================
   WRAPPER
   ========================= */
.sm-affirmation-wrapper {
    display: flex;
    justify-content: center;
    margin: 3em 0;
}

/* =========================
   MAIN CONTAINER (DESKTOP)
   ========================= */
.sm-affirmation-card {
    width: 100%;
    max-width: 1000px;
    padding: 3em 1.5em;

    border-radius: 16px;
    border: 1px solid rgba(40, 104, 81, 0.25);
    background: var(--wp--preset--color--background, #ffffff);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

/* =========================
   CATEGORY ROW
   ========================= */
.sm-affirmation-category-row {
    display: flex;
    align-items: center;
    gap: 0.6em;

    margin: 0 auto 1em;
    width: 100%;
    max-width: 600px;
}

/* Label */
.sm-affirmation-label {
    font-weight: 600;
    white-space: nowrap;
}

/* Dropdown */
.sm-affirmation-category {
    flex: 1;
    padding: 0.5em 2.4em 0.5em 0.5em;

    border-radius: 10px;
    border: 1px solid rgba(40, 104, 81, 0.35);
    background-color: transparent;
    font: inherit;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23286851' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9em center;
    background-size: 12px 12px;
}

/* =========================
   AFFIRMATION BOX
   ========================= */
.sm-affirmation-box {
    position: relative;

    display: grid;
    place-items: center;

    margin: 1em auto;
    padding: 1.2em;

    width: 100%;
    max-width: 700px;
    min-height: 180px;

    border-radius: 14px;
    border: 1px solid rgba(40, 104, 81, 0.25);
    background: rgba(40, 104, 81, 0.04);
}

/* =========================
   AFFIRMATION TEXT
   ========================= */
.sm-affirmation-result {
    margin: 0 !important;
    padding: 0;

    text-align: center;
    font-weight: 500;
    line-height: 1.7;
    font-size: 28px;

    max-width: 100%;
}

/* =========================
   COPY ACTIONS
   ========================= */
.sm-affirmation-actions {
    position: absolute;
    right: 0.8em;
    bottom: 0.8em;

    display: flex;
    align-items: center;
    gap: 0.4em;
}

/* Copy button (span) */
.sm-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* SVG icon */
.sm-copy-btn svg {
    display: block;
}

/* Copied text */
.sm-copied-text {
    font-size: 12px;
    color: #286851;
    opacity: 0.85;
}

/* =========================
   GENERATE BUTTON
   ========================= */
.sm-affirmation-btn {
    all: unset;
    cursor: pointer;
    display: inline-block;

    padding: 0.6em 1.4em;
    border-radius: 999px;

    background-color: #286851;
    color: #ffffff;

    text-align: center;
    font: inherit;
}

.sm-affirmation-btn:hover,
.sm-affirmation-btn:focus-visible {
    opacity: 0.9;
}

/* =========================
   MOBILE OVERRIDES
   ========================= */
@media (max-width: 768px) {

    .sm-affirmation-card {
        max-width: 100%;
        padding: 1.2em;
    }

    .sm-affirmation-category-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4em;
    }
    
    .sm-affirmation-box {
        max-width: 100%;
    }

    .sm-affirmation-box {
        min-height: 120px;
    }

    .sm-affirmation-result {
        font-size: 18px;
    }
}
