/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
    margin-block-end: 0;
    margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.5;
    font-size: 16px;
    font-family: 'Karla', serif;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
    line-height: 1.1;
}


/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
    font: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

.attribution {
    font-size: 11px;
    text-align: center;
    margin-top: 1rem;
}
.attribution a {
    color: hsl(228, 45%, 44%);
}

:root {
    /* Primary Colors */
    --button-purple: #382AE1;      /* Equivalent to hsl(179, 62%, 43%) */
    --bright-yellow: #f3d34a;  /* Equivalent to hsl(71, 73%, 54%) */

    /* Neutral Colors */
    --light-gray: #f5f5f5;     /* Equivalent to hsl(204, 43%, 93%) */
    --cancel-blue: #566280;     /* Equivalent to hsl(218, 22%, 67%) */
    --background-blue: #dee5fd;
    --white: #ffffff;
    --another-unlisted-color: #eeeffa
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--background-blue);
    background-repeat: no-repeat;

}

.summary-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white) ;
    border-radius: 1rem;
    overflow: hidden;

}

.summary-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80%;
}

button {
    border: none;
    width: 100%;
}

.payment-button {
    background-color: var(--button-purple);
    padding: .5rem;
    border-radius: 0.6rem;
    color: var(--white);
    font-weight: 700;
    margin: .5rem 0;
    box-shadow: 0 12px 18px rgba(56, 42, 225, 0.2);
}

.cancel-button {
    margin: .5rem 0;
    color:  var(--cancel-blue);
    font-weight: 700;
    background-color: transparent;
}

h1 {
    margin: 2rem 0;
    font-weight: 800;
    text-align: center;
}

p {
    text-align: center;
    font-weight: 500;
    color: var(--cancel-blue);
}

.details {
    margin: 1rem 0;
    display: flex;
    background-color: var(--another-unlisted-color);
    width: 100%;
    padding: 1rem;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.8rem;
    flex-wrap: wrap;
}

.plan {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

h2 {
    font-size: .9rem;
}

.change-link {
    color: var(--button-purple);
    font-weight: 700;
    text-decoration: underline;
    font-size: .7rem;
}

@media (min-width: 376px) {
    /* Styles for screens up to 375px */
    .page-container {

        background-image: url("images/pattern-background-desktop.svg");

    }

    .summary-container {
        max-width: 450px;
        max-height: 80vh;
        margin: 10px
    }

    h1 {
        margin: 2rem 0;
        font-weight: 800;
        text-align: center;
        font-size: 2rem;
    }

    p {
        font-size: 1.2rem;
        text-align: center;
        font-weight: 500;
        color: var(--cancel-blue);
    }


    h2 {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .change-link {
        color: var(--button-purple);
        font-weight: 700;
        text-decoration: underline;
        font-size: 1.1rem;
    }


    .payment-button {
        padding: 1.05rem;
        font-size: 1.1rem;
    }

    .payment-button:hover {
        background-color: #6851bb;
        cursor: pointer;
    }

    .cancel-button {
        font-size: 1.1rem;
        margin: .6rem 0;
    }

    .cancel-button:hover {
        color: #000; /* Change to black on hover */
        cursor: pointer;
    }

    .change-link:hover {
        text-decoration: none;
        cursor: pointer;
    }
}






@media (max-width: 375px) {
    /* Styles for screens up to 375px */
    .page-container {
        background-image: url("images/pattern-background-mobile.svg");
    }

    .summary-container {
        width: 90vw;
    }
}
