@import url("./global.css");
@import	url("./modal-utils.css");

/* app layout */
.app {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: 'header' 'main' 'footer';
}

.app-header {
    padding: 1rem 5vw;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    grid-area: header;
    display: flex;
    align-items: center;
    border-top: 0.4rem solid #596dd4;
}
.app-header__right {
    margin-left: auto;
}

.app-main {
    padding: 3rem 5vw;
    margin: 0 auto;
    width: calc(100vw - 10vw);
    height: calc(100vh - 19rem); /* viewport height - (header + footer) */
    overflow: auto;
    grid-area: main;
}

.app-footer {
    margin: 0;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #ddd;
    grid-area: footer;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.025);
}

/* List component styles */
.contact-list {
    display: block;
    list-style: none;
}
.contact-list__item {
    display: flex;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 1px rgba(0,0,0,0.3);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    background-color:rgba(255,255,255,0.6);
}
.contact-list__item:hover {
    background-color: rgba(255,255,255,1);
    box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
    border-left: 0.4rem solid #596dd4;
}
.contact-list__item:hover img {
    border-color: #596dd4;
}
.contact-list__item:last-child {
    margin-bottom: 0;
}
.contact-list__item img {
    border-radius: 100%;
    border: 2px solid #ddd;
    max-width: 4.8rem;
    max-height: 4.8rem;
    transition: var(--transition);
}
.contact-list__item__text {
    padding: 0 1.5rem;
    line-height: 1.5;
}
.contact-list__item__text label {
    font-weight: 700;
    color: #555;
    /* color: #026e98; */
}
.contact-list__item__text a {
    display: inline-flex;
    align-items: center;
    margin-top: 0.3rem;
    text-decoration: none;
}
.contact-list__item__text i {
    display: block;
    margin-right: 0.5rem;
}
.contact-list__item__actions {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.contact-list__item:hover .contact-list__item__actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%);
}
.contact-list__item__actions__delete {
    margin-left: 1.5rem;
}

.contact-list__item__actions__delete:hover {
    color: rgb(207, 0, 0);
    border-color: rgb(207, 0, 0);
}

/* add new contact */
.contact__form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2.5rem;
}
.contact__form label{
    margin: 1rem 0;
}
.contact__form span{
    display: block;
    margin-bottom: 0.5rem;
}
.contact__form input{
    display: block;
    border: 1px solid #ddd;
    padding: 0.8rem 1rem;
    outline: none;
    min-width: 20rem;
    border-radius: 0.4rem;
    transition: var(--transition);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);;
}
.contact__form input:focus {
    border-color: #596dd4;
}
