/* =========================================================
   AMA PHONE
========================================================= */

.phone {
    position: relative;

    width: 500px;
    height: 1000px;

    margin: 40px auto;

    padding: 14px;

    box-sizing: border-box;

    background: var(--brown-dark);

    border: 0px solid var(--brown-dark);
    border-radius: 38px;

    box-shadow:
        5px 5px 0 rgba(93, 53, 22, 0.35);
}


/* =========================================================
   PHONE SCREEN
========================================================= */

.phone-screen {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--background);

    border: 2px solid #392217;
    border-radius: 27px;
}


/* =========================================================
   PHONE SPEAKER
========================================================= */

.phone-speaker {
    position: absolute;

    top: 7px;
    left: 50%;

    transform: translateX(-50%);

    width: 55px;
    height: 5px;

    background: #392217;

    border-radius: 10px;

    z-index: 5;
}


/* =========================================================
   PHONE STATUS BAR
========================================================= */

.phone-status {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 9px 15px 5px;

    font-family: var(--heading-font);
    font-size: 0.65rem;

    letter-spacing: 1px;

    color: var(--brown-dark);
}


/* =========================================================
   PHONE APP HEADER
========================================================= */

.phone-header {
    padding: 12px 18px;

    text-align: center;

    font-family: var(--heading-font);
    font-size: 0.9rem;
    font-weight: 600;

    letter-spacing: 1.5px;

    color: var(--cream);

    background: var(--brown-dark);

    border-top:
        2px solid var(--brown-dark);

    border-bottom:
        2px solid var(--brown-dark);
}


/* =========================================================
   PHONE CONTENT
========================================================= */

.phone-content {
    flex: 1;

    min-height: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    padding: 12px;
}


/* =========================================================
   AMA QUESTIONS / CHAT
========================================================= */

#ama-questions {
    flex: 1;

    min-height: 0;

    display: flex;
    flex-direction: column;

    gap: 28px;

    overflow-y: auto;

    padding: 10px 8px 15px 0;
}


/* =========================================================
   AMA SCROLLBAR
========================================================= */

#ama-questions::-webkit-scrollbar {
    width: 8px;
}

#ama-questions::-webkit-scrollbar-track {
    background: var(--orange-light);

    border-radius: 10px;
}

#ama-questions::-webkit-scrollbar-thumb {
    background: var(--brown);

    border-radius: 10px;

    border: 2px solid var(--orange-light);
}

#ama-questions::-webkit-scrollbar-thumb:hover {
    background: var(--brown-dark);
}


/* =========================================================
   FORM / MESSAGE COMPOSER
========================================================= */

#ama-form {
    flex-shrink: 0;

    display: flex;
    flex-direction: column;

    gap: 6px;

    padding: 10px 12px;

    background: var(--cream);

    border-top:
        2px solid var(--brown-dark);
}


/* =========================================================
   NAME
========================================================= */

#ama-name {
    width: 100%;

    box-sizing: border-box;

    padding: 5px 8px;

    font-family: var(--body-font);
    font-size: 0.90rem;

    color: var(--brown-dark);

    background: transparent;

    border: none;

    border-bottom:
        1px dashed rgba(160, 90, 50, 0.4);

    outline: none;

    margin-bottom: 10px;
}

#ama-name::placeholder {
    color: var(--brown-dark);

    opacity: 0.6;
}


/* =========================================================
   MESSAGE COMPOSER
========================================================= */

.ama-compose {
    display: flex;
    align-items: flex-end;

    gap: 6px;
}


/* =========================================================
   MESSAGE INPUT
========================================================= */

#ama-question {
    flex: 1;

    min-height: 38px;
    max-height: 90px;

    padding: 9px 12px;

    box-sizing: border-box;

    resize: none;

    font-family: var(--body-font);
    font-size: 1rem;

    line-height: 1.4;

    color: var(--brown-dark);

    background: var(--background);

    border: 2px solid var(--brown-dark);

    border-radius: 18px;

    outline: none;

    transition:
        background 0.2s ease;
}

#ama-question::placeholder {
    color: var(--brown);

    opacity: 0.6;
}

#ama-question:focus {
    background: var(--orange-light);
}


/* =========================================================
   SEND BUTTON
========================================================= */

#ama-form button {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 15px;

    padding: 0;

    font-family: var(--heading-font);
    font-size: 1rem;

    color: var(--cream);

    background: var(--brown-dark);

    border: 2px solid var(--brown-dark);

    border-radius: 50%;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.15s ease;
}

#ama-form button:hover {
    background: var(--brown);

    transform: translateY(-1px);
}

#ama-form button:active {
    transform: translateY(1px);
}


/* =========================================================
   AMA POST
========================================================= */

.ama-post {
    padding-bottom: 30px;

    margin-bottom: 30px;

    border-bottom:
        1px dashed rgba(160, 90, 50, 0.35);
}

.ama-post:last-child {
    margin-bottom: 0;

    border-bottom: none;
}


/* =========================================================
   QUESTION
========================================================= */

.ama-question-row {
    display: flex;

    align-items: flex-start;

    gap: 10px;
}

.ama-avatar {
    width: 70px;
    height: 70px;

    flex-shrink: 0;

    object-fit: cover;

    background: var(--cream);

    border: 2px solid var(--brown-dark);

    border-radius: 50%;
}


/* =========================================================
   QUESTION BUBBLE
========================================================= */

.ama-question-bubble {
    padding: 9px 12px;

    background: var(--cream);

    border: 2px solid var(--brown-dark);

    border-radius:
        0 10px 10px 10px;

    line-height: 1.5;
}

.ama-question-bubble strong {
    display: block;

    margin-bottom: 3px;

    font-family: var(--heading-font);
    font-size: 1.1rem;

    color: var(--brown-dark);
}

.ama-question-bubble p {
    margin: 0;

    font-family: var(--body-font);
    font-size: 1rem;

    color: var(--brown);
}


/* =========================================================
   ANSWER
========================================================= */

.ama-answer {
    margin-top: 20px;

    padding-left: 48px;
}


/* =========================================================
   ANSWER ROW
========================================================= */

.ama-answer-row {
    display: flex;

    align-items: flex-end;
    justify-content: flex-end;

    gap: 10px;
}


/* =========================================================
   ANSWER CONTENT
========================================================= */

.ama-answer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    max-width: 85%;
}


/* =========================================================
   XIINGZI NAME
========================================================= */

.ama-answer-name {
    margin-right: 4px;
    margin-bottom: 6px;

    font-family: var(--heading-font);
    font-size: 1.1rem;
    font-weight: 600;

    letter-spacing: 1px;

    color: var(--brown-dark);
}


/* =========================================================
   XIINGZI AVATAR
========================================================= */

.ama-answer-avatar {
    width: 70px;
    height: 70px;

    flex-shrink: 0;

    object-fit: cover;

    background: var(--cream);

    border: 2px;

    border-radius: 50%;
}


/* =========================================================
   ANSWER BUBBLE
========================================================= */

.ama-answer-bubble {
    width: fit-content;
    max-width: 100%;

    padding: 10px 13px;

    text-align: left;

    background: var(--brown-dark);

    border: 2px solid var(--brown-dark);

    border-radius:
        10px 0 10px 10px;

    line-height: 1.6;
}

.ama-answer-text {
    font-family: var(--body-font);
    font-size: 1rem;

    color: var(--cream);
}


/* =========================================================
   READ MORE
========================================================= */

.ama-read-more {
    display: none;

    margin-top: 8px;

    padding: 0;

    font-family: var(--heading-font);
    font-size: 0.65rem;

    letter-spacing: 0.8px;

    color: var(--orange-light);

    background: transparent;

    border: none;

    cursor: pointer;
}

.ama-read-more:hover {
    color: var(--cream);
}


/* =========================================================
   IMAGES
========================================================= */

.ama-images {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 12px;
}

.ama-images a {
    display: block;
}

.ama-images img {
    display: block;

    width: 100%;
    max-width: 260px;
    height: auto;

    border: 2px solid var(--brown-dark);

    border-radius: 8px;
}


/* =========================================================
   TAGS
========================================================= */

.ama-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;

    margin-top: 10px;
}

.ama-tags span {
    font-family: var(--body-font);
    font-size: 0.7rem;

    color: var(--brown);

    opacity: 0.8;
}


/* =========================================================
   PHONE HOME BUTTON
========================================================= */

.phone-home-button {
    position: absolute;

    bottom: -23px;
    left: 50%;

    transform: translateX(-50%);

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    font-family: var(--heading-font);
    font-size: 0.8rem;

    color: var(--brown-dark);

    background: var(--cream);

    border: 3px solid var(--brown-dark);

    border-radius: 50%;

    box-shadow:
        0 3px 0 rgba(93, 53, 22, 0.3);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.2s ease;
}

.phone-home-button:hover {
    background: var(--orange-light);
}

.phone-home-button:active {
    transform:
        translateX(-50%)
        translateY(2px);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .phone {
        width: min(
            500px,
            calc(100vw - 30px)
        );

        height: 850px;

        margin: 30px auto;
    }

}