/*Needed to override default browser margins, doesn't work if using just div container*/
* {
}

body {
    font-family: Arial, Helvetica, sans-serif;
    /*That's already default 16*/
    /*font-size: 16px;*/
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* From: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
*, *:before, *:after {
    box-sizing: inherit;
}

:root {
    --geo-green: #009900;
    --geo-green-hover: #007700;
    --geo-green-active: #005500;
    --input-bg-color: #C8DDCE;
    --text-gray: #555;
    --dark-red: #990000;

    --sm-breakpoint: 576px;

    --text-xs: 0.75rem; /* 12px */
    --text-sm: 0.875rem; /* 14px */
    --text-md: 1rem; /* 16px */
    --text-lg: 1.125rem; /* 18px */
    --text-xl: 1.25rem; /* 20px */
    --text-2xl: 1.375rem; /* 22px */
}


.text-xs {
    font-size: var(--text-xs);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-md {
    font-size: var(--text-md);
}

.text-lg {
    font-size: var(--text-lg);
}

.text-xl {
    font-size: var(--text-xl);
}

.text-2xl {
    font-size: var(--text-2xl);
}

.text-white {
    color: white;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-white-override {
    /* So far used only in the map */
    color: white !important;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.m-10 {
    margin: 10px;
}

.m-0 {
    margin: 0;
}

.m-auto {
    margin: auto;
}

.resize-y {
    resize: vertical;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.object-cover {
    object-fit: cover;
}

.object-contain {
    object-fit: contain;
}


/*
General links BEGIN
*/

a {
    color: var(--geo-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:hover, a.hover {
    text-decoration: underline;
}

a:active, a.active {
    color: #663333;
    text-decoration: underline;
}

/*
General links end
 */

/* Text inputs, both oneline and multiline  BEGIN */

.rinput {
    border: 1px solid #A5ACB2;
    background-color: var(--input-bg-color);

    padding: 5px;
    border-radius: 4px;
}

/* Text inputs, both oneline and multiline END*/

/* Forms BEGIN */

.form-container {
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}

.form-label {
    flex: 0 0 180px;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.form-value {
    flex: 1;
    min-width: 0;
}

.form-center {
    justify-content: center;
    text-align: center;
}

@media (max-width: 576px) {
    .form-label {
        flex: 100%;
        margin-bottom: 0.5rem;
    }

    .form-value {
        flex: 100%;
    }
}


.error {
    font-weight: bold;
    color: var(--dark-red);
}

/* Forms END */


/* tabs BEGIN */

.tabs-container {
    max-width: 800px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    background: #eee;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch
}


.tab-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    /*For icons as images*/
    height: 1.5rem;
}

.tab-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: var(--text-sm);

    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    min-width: 100px;
}

.tab-button.active {
    background: white;
    font-weight: bold;
    border-bottom: 2px solid var(--geo-green);
}

/* Tab content */
.tab-content {
    display: none;
    padding: 20px;
    position: relative;
}

.tab-content.active {
    display: block;
}

/* tabs END */

.photo-gallery {
    display: flex;
    flex-direction: column;
    gap: 2em;
    padding: 1em;
}

.album {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1em;
    background: #fdfdfd;
    max-width: 800px;
    margin: 0 auto;
}

.album-header {
    font-weight: bold;
    margin-bottom: 0.5em;
    display: flex;
    justify-content: space-between;
    font-size: 1em;
}

.album-date {
    font-style: italic;
    color: #777;
}

.album-photos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

.photo-item {
    border: 2px solid #C8DDCE;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.85em;
    border-radius: 4px;
    background: #fff;
}

.photo-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: transform 0.2s ease;
}

.photo-caption {
    margin-top: 4px;
    font-style: italic;
    color: #555;
    font-size: 0.8em;
    max-width: 100%;
    word-break: break-word;
    line-height: 1.2em;
}

.photo-item img:hover {
    transform: scale(1.03);
}


/* Notification badge */
.notification-wrapper {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: 3px;
    right: 0;
    transform: translate(50%, -50%);
    background: red;
    color: white;
    font-size: 0.7em;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
    font-weight: bold;
    box-shadow: 0 0 0 1px white;
}

/*
General green button BEGIN
 */

.green-button {
    display: inline-block;
    padding: 10px 20px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    background-color: var(--geo-green);
    border-radius: 7px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
    white-space: nowrap; /* Prevents text from breaking */
    border: none;
}

.green-button:hover, .green-button.hover {
    text-decoration: none;
    background-color: var(--geo-green-hover);
    transform: scale(1.05);
}

.green-button:active, .green-button.active {
    text-decoration: none;
    background-color: var(--geo-green-active);
    color: white;
}


.btn-gray-2 {
    background-color: #bbb;
}

.btn-gray-2:hover {
    background-color: #999;
}

.btn-gray {
    border: 1px solid #ddd;
    background-color: #f1f1f1;
    color: #4CAF50;
}

.btn-gray:hover {
    background-color: #66bb6a; /* Lighter green */
    color: white;
}

.btn-gray:active {
    background-color: var(--geo-green-active); /* Darker green */
    border: 1px solid var(--geo-green-active);
}

/*
General green button END
 */

/*
Like buttons
 */

.like-count {
    color: #666;
    font-size: 0.9em;
    margin-left: 3px;
    display: inline-block;
    vertical-align: middle;
    font-weight: bold;
}


.like-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--geo-green);
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.like-button .fa-heart {
    transition: transform 0.2s;
}

.like-button:hover i {
    transform: scale(1.2);
    color: var(--geo-green-hover);
}

.like-button[data-liked="true"] .fa-heart {
    color: var(--geo-green-active);
    transform: scale(1.2);
}

/* Misc button

 */

.edit-button {
    border: thin outset #eeeeee;
    font-weight: bold;
    cursor: pointer;
    color: #463D2E;
    background: #eeeeee url(/images/lbgr.gif);
    padding: 5px;
}

.edit-button:hover {
    background-color: #dddddd;
    color: #2e2618;
    border: thin inset #cccccc;
}

.edit-button:active {
    background-color: #cccccc;
    color: #1e1a13;
    border: thin inset #aaaaaa;
    transform: translateY(1px);
}


/*
User links almost everywhere BEGIN
 */

.login-link {
    color: #666600;
    text-decoration: none;
    font-weight: bold;
}

.login-link:hover {
    text-decoration: underline;
}

.login-link:active {
    color: #663333;
    text-decoration: underline;
}

/*
User links END
 */

/*
 || Helper styles
 */

.hidden {
    display: none;
}

.bold {
    font-weight: bold;
}

.not-bold {
    font-weight: normal;
}

.italic {
    font-style: italic;
}

.overlay {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: black;
    opacity: 0.5;
    z-index: 999;
}

.loader {
    top: 50%;
    left: 50%;
    /* bring your own prefixes */
    transform: translate(-50%, -50%);
    z-index: 99999;

    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #217826;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}


.hide-desktop {
    display: none;
}

.hide-mobile {
    display: revert;
}

@media screen and (max-width: 768px) {
    .hide-desktop {
        display: revert;
    }

    .hide-mobile {
        display: none;
    }
}
