/* The way I code is to have mobile first so I design the css to assume mobile */
/* at the responsive media query, i then get a desktop version */
/* I notice code start to break with the tabet size so I break the listing images in 2 rows to avoid that*/
html { font-size: 10px; }
body { font-family: 'Open Sans', Verdana, sans-serif; } /* use Open Sans as requested */
h6 { text-align: left; }

h1 {
    font-size: 3.3em;
    font-weight: bold;
    color: white;
}

h2 {
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
    color: #666;
    padding-bottom: 0.2em;
}

h3 {
    text-align: left;
    font-size: 1.5em;
    color: #666;
    padding-bottom: 1em;
    font-weight: 500;
    /* to achieve semi bold , it is usually a value between 400-700 */
}

h5 {
    margin-top: 1em;
    line-height: 1.5em;
    color: #666;
}


p {
    margin-top: 1em;
    line-height: 1.5em;
    color: #666;
}

header p {
    margin-bottom: 2em;
    font-size: 1.5em;
    font-style: italic;
}

header {
    background-color: #98D7CB;
    text-align: center;
    height: auto;
    padding: 20px;
    color: #fff;
    border-bottom: solid 10px #379F9F
        /*darker teal*/

}

/* section main */
/* center item, using flex so all items are centered for mobile device */
main {
    display: flex;
    align-items: center;
    flex-direction: column;

}
main img { max-height: 250px;}

main p {font-size: 1.5rem;}

/*--- Section listing items ---*/

.subHeading h3 {
    font-size: 2.3em;
    text-align: center;
}

.listing { /* listing 2 column for mobile device */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
    border-top: 1px solid #379F9F;
    border-bottom: 1px solid #379F9F;
    padding-top: 1em;
    padding-bottom: 1em;
    margin-top: 1em;
    margin-bottom: 1em;

}

.listing h2 {grid-column: 1/-1;}

figure img {max-width: 100%;}

figcaption {
    display: flex;
    align-items: center;
    font-size: large;
}

figcaption img {
    margin-right: 5px;
    /* Adjust the margin between the icon and text */
    width: 3rem;
    height: 2.5rem;
}

/*-----  all element are adjusted by default mobile and other comment elemetnss below till media query -----*/


/* set max to 1200 as larger then that the content wont be pretty */
main,
section,
form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* margin not auto for the sections of room type and other amenities */
.container section {
    margin: 0;
}

fieldset {
    border: dotted 1px #569a99;
}

fieldset {
    margin: 2em 0.5em;
    padding: 1em 2em;
    min-width: 200px;

}

fieldset h3 {text-align: left;}

form h2 {
    text-align: left;
    font-size: 1.5rem;
    color: #379F9F;
    border-bottom: 1px solid #569a99;
    margin-bottom: 1em;
    max-width: 720px;
}


legend {
    font-size: 1.6em;
    padding: 0 .25em;
    font-style: normal;
    font-weight: bold;
    color: #569a99;
    text-transform: uppercase;
    /* all legend should be upper case */
}


form h4 {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: .25em;
}

form li {
    list-style-type: none;
    margin-bottom: .6em;
}

label {
    display: block;
    font-size: 1.2em;
    margin-bottom: .25em;
    color: #666;
}


/* Room list style */
.formGroup li {
    position: relative;
    margin-bottom: 20px;
}


.roomLabel,
.padHeading,
.amenity {
    font-weight: 500;
    color: #666;
    font-size: 1.6em;
}

.padHeading h3 {
    margin-top: 10px;
}

select.formControl {
    -webkit-appearance: none;
    -moz-appreance: none;
    appearance: none;

}

.formGroup select.formControl {
    min-width: 350px;
}

select.formControl + .selectArrow {
    position: absolute;
    right: 6px;
    bottom: 13px;
    width: 30px;
    text-align: center;
    pointer-events: none;


}

.formControl {
    background-color: #fff;
    padding: 10px;
    color: #333;
    border: solid 2px #dfe5e9;
    border-radius: 4px;
    display: block;
    width: 100%;
}

input:focus,
select:focus {
    outline: solid 2px #4fa3e3;
    box-shadow: 0 0 3px #4fa3e3;

}

.formControl::-webkit-input-placeholder {
    color: #dfe5e9;
}

.formControl::-ms-input-placeholder {
    color: #dfe5e9;
}

.formControl::placeholder {
    color: #dfe5e9;
}

.formControl:focus {
    background-color: #fafafd;
}

.basic input,
.basic textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    /* Include padding and border in the element's total width */
}



label {
    padding-top: 1em;
    /* make sure there are spance before each label */
}

.basic textarea {
    min-height: 250px;
}

input[type="email"] {
    min-width: 225px;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
    display: inline-block;
    padding-top: 0;
    margin-top: 0;
}

/* Begin styling address */

ul {
    padding-bottom: 20px;
}

ul.location {
    display: grid;
    grid-template-columns: 4fr 3fr 1fr 2fr;
    gap: 10px;
    /* Adjust the gap between columns if needed */

}

ul.location li:first-child {
    grid-column: span 4;
    /* Make the first item span four columns */
}

ul.location li:last-child {
    grid-column: span 2;
    /* Make the last item span 2 to make sure it align with address */
}

/* Style for input fields */
ul.location input[type="text"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;

}

/* End styling address */

/*begin section what is your pad like, mobile first*/

/* begin styling pad type */
.checks {
    margin-bottom: 2em;
}

.checks label {
    margin-top: 0;
}

ul.checks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    /* Adjust the gap between columns*/
}

/* end styling pad type */



#radioList {

    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 20px;

}


select {
    margin-bottom: 1.5em;
}

textarea {
    width: 94%;
    min-height: 60px;
    padding: .4em;

    margin-bottom: 1.5em;
}

.button {
    font-size: 1.6rem;
    border-radius: 10px;

}

/* customize radio button */
#radioList input {
    position: absolute;
    margin-left: -9999px;
    visibility: hidden;
}

#radioList label {
    display: block;
    margin-bottom: .5em;
    position: relative;
    padding: 2px 0 0 30px;
    /* pur radio button on left of text */
    color: #333;

}

/* radio button customization */
#radioList input + span {
    position: absolute;
    left: 2px;
    top: 0px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: solid 2px #ccc;
    border-radius: 50%;
}

#radioList input + span:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: #4fa3e3;
    transform: translate(-50%, -50%);
}

#radioList input:not(:checked) + span:after {
    opacity: 0;
}

#radioList input:checked + span:after {
    opacity: 1;
    width: 10px;
    height: 10px;
}

.button#submit {
    background-color: #569a99;
    color: white;
    width: 100%;
    /* Adjust the width as needed */
    border: none;
    /* Remove the border */
    border-radius: 8px;
    /* Add border-radius for a rounded appearance */
    font-size: 1.4rem;
    /* Adjust the font size as needed */
    padding: 10px;
}


footer {
    margin-top: 50px;
    background-color: #98D7CB;
    min-height: 3rem;
    display: flex;
    align-items: center;
    /* Center vertically */
    justify-content: center;
    /* Center horizontally */
}

footer p {
    font-size: 1.2em;
    margin: 0;
}

/**---------------------------------Section for Responsibe Website ---------------**/

/* for desktop */
@media screen and (min-width: 1025px) {

    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;

    }

    header h1 {
        margin-bottom: 10px;
        /* Add a margin between h1 and p */
    }

    /* have image and heading in same line, changing flex-direction to row */
    main {
        flex-direction: row;
        justify-content: space-around;
    }

    h2 {
        text-align: left;
    }

    .subHeading h3 {
        font-size: 1.8em;
        text-align: left;
    }

    main p {
        margin-bottom: 0.5em;
        /* Ensure proper spacing */
        margin-left: 30px;
        width: 100%;
    }


    .listing { /* 6 items for big screen */
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-gap: 10px;
    }

    .listing h2 {

        justify-self: start;

        /* need to align back to left when  it is desktop size */
    }


    form {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 2rem;

    }


    ul.location {
        display: grid;
        grid-template-columns: 4fr 3fr 1fr 2fr;
        gap: 10px;
        /* Adjust the gap between columns if needed */
        padding-bottom: 10px;

    }

 /* container for radiolist and roomType */
    .container { 

        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    ul.checks {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        /* Adjust the gap between columns if needed */
    }

    
}


/* for tablet sizes  i need to do something here as the screen break at tablet size and need scrolling so I split into 3 images
and verified in my ipad. i notice with 6 images, the page gets messy so split images in 2 rows is a good idea */
@media only screen and (min-width: 767px) and (max-width: 1024px) {

    .subHeading h3 {
        text-align: center;
        font-size: 1.5em;
    }

    .listing {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 10px;
    }


    .container {

        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
}
