/* Som gamla sajten (css/pm2017.css): sidhuvud med bild, slogan och en blågrå menyrad. */

body {
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #fff;
}

.wedding-header {
    position: relative;
    height: 100px;
    background: url("img/header_bg_100.png") repeat-x;
}

.wedding-header .slogan {
    position: absolute;
    inset: 0 115px 0 115px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.wedding-header .logo {
    position: absolute;
    right: 0;
    top: 0;
    width: 115px;
    height: 100px;
    background: url("img/header_right_100.png");
}

.wedding-menu {
    background-color: #6e969f;
    text-align: center;
}

.wedding-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wedding-menu li {
    display: inline-block;
}

.wedding-menu a {
    display: block;
    padding: 10px;
    color: #fff;
    text-decoration: none;
}

.wedding-menu a:hover,
.wedding-menu a.active {
    background-color: #007496;
    color: #fff;
}

.wedding-body {
    padding: 1.5rem 1rem 3rem;
}

@media (max-width: 575.98px) {
    .wedding-header .slogan {
        inset: 0 115px 0 0;
        font-size: 18px;
    }
}

/* Rättat rutnät (som justifiedGallery): bilderna fyller raderna med samma höjd. Varje bild får en bredd
   efter sitt bildformat (site.js sätter flex-basis/flex-grow när bilden laddats), tills dess 3:2. */
.gallery {
    --row-height: 200px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gallery::after {
    content: "";
    flex-grow: 999;
}

.gallery a {
    flex: 1.5 1 calc(var(--row-height) * 1.5);
    height: var(--row-height);
    position: relative;
    overflow: hidden;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: bottom;
    transition: transform .3s;
}

.gallery a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .1) url("img/zoom.png") no-repeat center;
    opacity: 0;
    transition: opacity .3s;
}

.gallery a:hover::after {
    opacity: 1;
}

.gallery a:hover img {
    transform: scale(1.05);
}

@media (max-width: 575.98px) {
    .gallery {
        --row-height: 110px;
        gap: 4px;
    }
}

/* Admin */

.admin-body {
    padding: 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.admin-thumb {
    position: relative;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 4px;
}

.admin-thumb:has(input:checked) {
    border-color: #007496;
}

.admin-thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.admin-thumb input {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
}

.admin-thumb .views {
    position: absolute;
    right: 4px;
    bottom: 4px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: .75rem;
    padding: 0 4px;
    border-radius: 3px;
}

.admin-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding: .5rem 0;
}
