* {
    font-family: InterVariable, sans-serif;
    font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */
}

nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

.body {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - calc(25px * 2) - calc(11px * 2));
}

.nav-grid {
    height: 72px;
    border-bottom: 1px solid rgba(217, 217, 217, 0.5);
    width: calc(100% - calc(25px * 2));

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    
    padding-left: 11px;
    padding-right: 11px;
}

.nav-search {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    padding-left: 14px;
    padding-right: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
    border: none;
    border-radius: 10px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    outline: none;
}

.nav-search-button {
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px;
    aspect-ratio: 1 / 1;
    transition: 0.3s;
}

.nav-search-button:hover {
    color: dimgray;
}

.nav-search-flex {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(217, 217, 217, 0.5);
    outline: none;
}

.nav-right-account {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 10px;
    height: 72px;
}

.account-pfp {
    height: 100%;
    aspect-ratio: 1 / 1;
    height: 40px;
    border-radius: 9999px;
    background: silver;
    cursor: pointer;
    transition: 0.3s;
}

.nav-icon-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    color: gray;
    aspect-ratio: 1 / 1;
    height: 32px;
    width: 32px;
    border-radius: 50%;
    text-decoration: none;
}

.nav-icon-btn:hover, .nav-icon-btn:focus-visible {
    color: black;
}

.nav-logo-img {
    height: 18px;
}

.form-facets {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 10px;
}

.btn-text-w-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.new-resource-form-section {
    border: 1px solid rgba(217, 217, 217, 0.5);
    padding: 15px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-radius: 10px;
}

.sect-header-with-number {
    display: flex;
    align-items: center;
    gap: 15px;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.attachments-grid-item {
    background: white;
    border-radius: 10px;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(217, 217, 217, 0.5);
}

.attachments-grid-item-empty {
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.attachments-grid-item-empty .material-symbols-rounded {
    font-size: 42px;
}

.attachments-grid-item:nth-child(11) {
    /* hide add button when 10 elements */
    display: none;
}

.attachments-grid-item-item {
    display: grid;
    overflow: hidden;
    grid-template-rows: 3fr 1fr;
}

.attachment-details {
    background: #f9f9f9;
    border-top: 1px solid rgba(217, 217, 217, 0.5);
    display: flex;
    align-items: center;
    padding-left: 7px;
    padding-right: 7px;
}

.attachments-grid-item-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
}

.attachment-details-inner {
    display: grid;
    grid-template-columns: 3fr 1fr;
    justify-content: space-between;
    overflow: hidden;
    width: 100%;
}

.attachment-detail-remove-btn {
    display: flex;
    justify-content: end;
    align-items: center;
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.attachment-detail-title {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-form-upload-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 10px;
    align-items: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

.results-grid-resource {
    border: 1px solid rgba(217, 217, 217, 0.5);
    border-radius: 10px;
    aspect-ratio: 5 / 3;
    display: block;
    padding: 20px;
    text-decoration: none;
    transition: 0.3s;
}

.results-grid-resource:hover {
    background: #f0f0f0;
}

.resource-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 10px;
}

.resource-grid-attatchments {
    border: 1px solid rgba(217, 217, 217, 0.5);
    padding: 15px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-radius: 10px;
}

.resource-header-flex {
    display: flex;
    gap: 10px;
    align-items: center;
}

.resource-header-input {
    font-size: 28px;
    width: 100%;
}

.subject-edit-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* phone width */
@media only screen and (max-width: 600px) {
    .attachments-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .attachments-grid-item {
        aspect-ratio: 5 / 3;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }
}