/* This CSS file was generated by the make-gallery script written by Luca Saiu:
   see https://ageinghacker.net/hacks/#make-gallery .

   * About make-gallery:
     Copyright (C) 2022, 2024, 2025 Luca Saiu
     Copyright (C) 2022 p≡p Foundation
     Written by Luca Saiu

     make-gallery is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 3 of the License, or
     (at your option) any later version.

     make-gallery is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with make-gallery.  If not, see <https://www.gnu.org/licenses/>.

   * About HTML, CSS and JavaScript code:
     The HTML, CSS and JavaScript code generated by make-gallery is released
     into the public domain, up to the extent of the applicable law.

   * About images and custom CSS:
     The copyright status of the files supplied by the make-gallery user
     has nothing to do with the script...  */

/* This is the right thing, but apparently not widely supported yet. */
/*
@viewport {
      width: device-width;
      initial-scale: 1;
}
*/

.gallery-body {
      text-align: center;

      margin: 0; /* The default is not zero.  I want to reuse that space
                    for the background image. */

      /* The border serves to show our background colour or image. */
      border: transparent;
      border-style: solid;
      /*border-width: 2em 10em 5em 10em;*/ /* top right bottom left */
      border-width: 1em 10em 0.5em 10em; /* top right bottom left */

      /* This can be customised by defining something like:
            background: green;
         or, even better:
            background: url(https://example.com/background.jpg);
            background-size: 20em;  */
}

.gallery-main-pane {
      padding: .125em; /* top right bottom left */
}

.gallery-p, .gallery-h
, .gallery-thumbnail-previous-or-next-image  {
      margin: 0;
      padding: .125em;
}

.gallery-thumbnail, .gallery-thumbnail-previous-or-next-image {
    object-fit: contain;
    border: 0em;
    vertical-align: middle;
    display: block;
}

.gallery-thumbnail-previous-or-next-image, .gallery-thumbnail {
    width: 6em;
    height: 6em;
}

.gallery-thumbnail-link,
.gallery-previous-thumbnail-link,
.gallery-next-thumbnail-link {
    display: inline-block;
    text-decoration: none;
}
.gallery-previous-thumbnail-link,
.gallery-next-thumbnail-link {
    position: fixed;
    transform: translateY(calc(-100% - 4em));
    top: 100%;
}
.gallery-previous-thumbnail-link,
.gallery-next-thumbnail-link {
    padding: .1em;
}
.gallery-previous-thumbnail-link {
    left: 1em;
}
.gallery-next-thumbnail-link {
    right: 1em;
}
.gallery-image {
    display: inline-block;
    object-fit: contain;
    min-width:0; max-width:80vw;
    min-height:80vh; max-height:80vh;
    /* FIXME: I am keeping this older solution commented-out.  It works well
       for images to be scaled down; images to be scaled up were shown small
       (but not distorted, and with no need to scroll).
    display: inline-block;
    object-fit: contain;
    max-width: 100%;
    max-height: 80vh;
    */
}
/* Experimental, along with the thing above: */
/* .gallery-main-pane {  height: 90vh; } */


@media screen and
(orientation: portrait)
and (max-device-width: 1000px) {
    .gallery-main-pane {
        border-width: .5em; /* top right bottom left */
    }
}

/* Narrow window, cellphone or not. */
@media (max-width: 1000px) {
    .gallery-body {
        border-width: 0.75em; /* top right bottom left */
    }
    .gallery-main-pane {
        padding: 0.125em; /* top right bottom left */
    }
    .gallery-thumbnail-previous-or-next-image,
    .gallery-thumbnail {
        width: 4em;
        height: 4em;
    }
}

@media screen and
(orientation: landscape)
and (max-device-width: 1000px) {
    .gallery-main-pane {
        border-width: 0.125em; /* top right bottom left */
    }
}
