@tailwind base;
@tailwind components;
@tailwind utilities;

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
}

.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    position: relative;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-ui {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1十一章AyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4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2000;
}

.blazor-error-boundary::after {
    content: "Ein unerwarteter Fehler ist aufgetreten.";
}

svg {
    border: none;
    background: none;
    margin-right: 0.25rem;
}

svg[style*="margin-right: 0;"] {
    margin-right: 0 !important;
}

button {
    white-space: normal;
    word-wrap: break-word;
}

body {
    background-image: url(pexels-eberhardgross-1367192.avif);
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
}

.main-timer-container {
    background-color: rgba(31, 41, 55, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background-color 0.5s ease-in-out, opacity 0.3s ease-in-out;
}

.minimal-mode.main-timer-container {
    background-color: rgba(31, 41, 55, 0.60);
}

div.page > main > .top-row {
    background-color: rgba(17, 24, 39, 0.88);
    border-bottom: 1px solid rgba(55, 65, 81, 0.65);
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    height: 3.5rem;
    z-index: 1035;
    display: flex;
    align-items: center;
    padding-right: 1rem;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
}

.top-row-right-side {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 1rem;
}

.datetime-display {
    color: #D1D5DB;
    font-size: 1rem !important;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.news-ticker-container {
    color: #CFD8DC;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;

    -webkit-mask-image: -webkit-linear-gradient(to right,
    transparent 0, black 20px, black calc(100% - 20px), transparent 100%
    );
    mask-image: linear-gradient(to right,
    transparent 0,
    black 20px,
    black calc(100% - 20px),
    transparent 100%
    );
}

.news-ticker-content {
    display: inline-block;
    animation: ticker-scroll 180s linear infinite;
    transform: translateX(100%);
}

.news-ticker-container:hover .news-ticker-content {
    animation-play-state: paused;
}

.news-ticker-content .news-item {
    display: inline-block;
    padding-right: 20px;
}

.news-ticker-content a {
    color: inherit;
    text-decoration: none;
    padding: 5px 0;
}

.news-ticker-content a:hover {
    text-decoration: underline;
    color: #FFFFFF;
}

.news-ticker-content a.news-item-fresh {
    color: #6EE7B7;
}

.news-ticker-content a.news-item-fresh:hover {
    color: #A7F3D0;
}

.news-ticker-content .separator {
    padding: 0 15px;
    color: #9CA3AF;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.weather-display {
    display: flex;
    align-items: center;
    color: #D1D5DB;
    font-size: 1rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.weather-display .wi {
    font-size: 1.5em;
    margin-right: 0.5rem;
    color: #93C5FD;
}

.sidebar {
    background-color: rgba(17, 24, 39, 0.88);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(55, 65, 81, 0.65);
}

.sidebar .top-row {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(55, 65, 81, 0.65);
    height: 3.5rem;
    padding-left: 1rem;
    display: flex;
    align-items: center;
    position: relative;
    left: auto;
    right: auto;
    z-index: auto;
    width: 100%;
}

.site-logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.koala-icon {
    height: 60px;
    width: auto;
}

.logo-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    padding: 0 0.75rem;
}

.logo-text-main {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #E5E7EB;
    display: block;
}

.logo-text-sub {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #9CA3AF;
    display: block;
    letter-spacing: 0.05em;
}

.sidebar .navbar-brand {
    color: #E5E7EB !important;
    font-weight: 600;
}

.sidebar .nav-scrollable {
    flex-grow: 1;
    overflow-y: auto;
    background-color: transparent;
}

.sidebar .nav-link {
    color: #9CA3AF;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
    padding: 0.5rem 1rem;
}

.sidebar .nav-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    stroke: #9CA3AF;
    fill: none;
}

.sidebar .nav-link:hover {
    color: #F3F4F6;
    background-color: rgba(55, 65, 81, 0.4);
}

.sidebar .nav-link:hover svg {
    stroke: #F3F4F6;
}

.sidebar .nav-item.active > .nav-link,
.sidebar .nav-item.active > .nav-link svg {
    color: #FFFFFF;
    stroke: #FFFFFF;
    background-color: rgba(75, 85, 99, 0.6);
}

div.page > main {
    padding-top: 3.5rem;
    padding-left: 250px;
    flex-grow: 1;
}

div.page > main > article.content {
    padding: 1.5rem;
}

.progress-bar-inner {
    transition: width 0.2s ease-out, background-color 0.5s ease-in-out;
    background: linear-gradient(90deg, #34D399, #10B981);
}

.progress-bar-inner.warning {
    background: linear-gradient(90deg, #FBBF24, #F59E0B);
}

.progress-bar-inner.danger {
    background: linear-gradient(90deg, #F87171, #EF4444);
}

.progress-bar-inner.pause-phase {
    background: linear-gradient(90deg, #60A5FA, #3B82F6);
}

.progress-bar-inner.finish-phase {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

#inviteLinkDisplay.hidden,
#collaborationModal.hidden {
    display: none;
}

#collaborationModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: 90%;
    max-width: 500px;
}

.toast-message-android {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.animate-toast-bottom-fade {
    animation: toastBottomFade 3s ease-in-out forwards;
}

@keyframes toastBottomFade {
    0% {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
}

.control-button svg, .settings-button svg, .sidebar .nav-link svg {
    stroke: currentColor;
}

.bg-green-500 svg, .bg-yellow-500 svg, .bg-red-500 svg {
    stroke: white;
}

.bg-gray-700 svg, button.p-2.bg-purple-600 svg, button#closeCollaborationModalButton svg, div.bg-purple-600 > button svg {
    stroke: white;
}

.bg-gray-700.hover\:bg-gray-600:hover svg {
    stroke: white;
}

button.p-2.bg-purple-600:hover svg {
    stroke: white;
}

.timer-display-font {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    transition: font-size 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.reviews-container-wrapper {
    min-height: 220px;
    transition: opacity 0.4s ease, transform 0.4s ease, height 0.4s ease;
}

.reviews-container {
    display: flex;
    overflow-x: auto;
    position: relative;
    height: 155px;
    gap: 1rem;
    padding-bottom: 1rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.reviews-container::-webkit-scrollbar {
    display: none;
}

.review-card {
    background-color: rgba(55, 65, 81, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    width: 250px;
    min-width: 220px;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: #D1D5DB;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.review-item-enter {
    opacity: 0;
    transform: translateX(100%);
}

.review-item-visible {
    opacity: 1;
    transform: translateX(0);
}

.review-item-exit {
    opacity: 0;
    transform: translateX(-100%);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
    border: 2px solid #4B5563;
}

.review-username {
    font-weight: 600;
    color: #E5E7EB;
    margin-right: auto;
}

.review-stars {
    display: flex;
}

.review-stars svg {
    width: 0.875rem;
    height: 0.875rem;
    margin-left: 0.125rem;
}

.review-text {
    font-size: 0.875rem;
    line-height: 1.4;
    font-style: italic;
    color: #CBD5E1;
    max-height: 3.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* === MINIMALIST MODE BUTTON STYLES === */
.toggle-minimal-mode-button {
    opacity: 1;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    pointer-events: auto;
    visibility: visible;
}

.main-timer-container.minimal-mode .toggle-minimal-mode-button {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.main-timer-container.minimal-mode:hover .toggle-minimal-mode-button {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Selektoren für Elemente, die im Minimalmodus ausgeblendet werden */
.minimal-mode .absolute.top-4.right-4.z-20 > button:not(.toggle-minimal-mode-button),
.minimal-mode #collaborationModal,
.minimal-mode .relative.flex.flex-col.items-center.justify-center.mb-4,
.minimal-mode .flex.justify-center.space-x-2.sm\:space-x-3.mb-6,
.minimal-mode p.text-center.text-gray-400.mb-6,
.minimal-mode .text-center > button.settings-button,
.minimal-mode .settings-panel,
.minimal-mode .toast-message-android,
.minimal-mode .reviews-container-wrapper {
    opacity: 0 !important;
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transform: scale(0.95);
    transition: opacity 0.4s ease, height 0.4s ease, padding 0.4s ease, margin 0.4s ease, transform 0.4s ease;
}

/* Übergänge für die Elemente, die im Normalmodus sichtbar sind und im Minimalmodus ausgeblendet werden */
.absolute.top-4.right-4.z-20 > button:not(.toggle-minimal-mode-button),
#collaborationModal,
.relative.flex.flex-col.items-center.justify-center.mb-4,
.flex.justify-center.space-x-2.sm\:space-x-3.mb-6,
p.text-center.text-gray-400.mb-6,
.text-center > button.settings-button,
.settings-panel,
.toast-message-android,
.reviews-container-wrapper {
    transition: opacity 0.4s ease, height 0.4s ease, padding 0.4s ease, margin 0.4s ease, transform 0.4s ease;
}

/* Allgemeine Minimal-Modus Styles für den Hauptcontainer */
.minimal-mode {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 65vh;
    transition: min-height 0.5s ease-in-out;
}

.minimal-mode .text-center.mb-6 {
    margin-bottom: 2rem !important;
    padding-top: 0 !important;
}

#progressBarContainer {
    transition: width 0.5s ease-in-out, max-width 0.5s ease-in-out, margin 0.5s ease-in-out;
}

.minimal-mode #progressBarContainer {
    margin-bottom: 0 !important;
    width: 90%;
    max-width: 600px;
}

.minimal-mode .timer-display-font {
    font-size: clamp(4rem, 20vw, 10rem) !important;
    line-height: 1 !important;
}

/* Lato Font-Face Deklarationen */
@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: normal;
    font-weight: 100;
    src: url('../fonts/lato-v24-latin_latin-ext-100.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: italic;
    font-weight: 100;
    src: url('../fonts/lato-v24-latin_latin-ext-100italic.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/lato-v24-latin_latin-ext-300.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: italic;
    font-weight: 300;
    src: url('../fonts/lato-v24-latin_latin-ext-300italic.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/lato-v24-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: italic;
    font-weight: 400;
    src: url('../fonts/lato-v24-latin_latin-ext-italic.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/lato-v24-latin_latin-ext-700.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: italic;
    font-weight: 700;
    src: url('../fonts/lato-v24-latin_latin-ext-700italic.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: normal;
    font-weight: 900;
    src: url('../fonts/lato-v24-latin_latin-ext-900.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Lato';
    font-style: italic;
    font-weight: 900;
    src: url('../fonts/lato-v24-latin_latin-ext-900italic.woff2') format('woff2');
}

body.background-blur-active::before {
    content: '';
    position: fixed;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px; /* Leicht vergrößern, um harte Kanten durch den Blur zu vermeiden */
    background: inherit; /* Erbt den Hintergrund vom Body */
    background-attachment: fixed; /* Wichtig, damit das Bild nicht mitscrollt */
    z-index: -1;
    filter: blur(4px);
    transition: filter 0.4s ease-in-out;
}