@import url('https://fonts.googleapis.com/css2?family=Maven+Pro:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    height: -webkit-fill-available; /* iOS Safari */
    overflow: hidden;
}

body {
    font-family: 'Maven Pro', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f4f4;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS Safari */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    /* Täysnäyttö */
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Estä zoomaus ja tekstin valinta */
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.container {
    background: #ffffff;
    border: 4px solid #000000;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

.header {
    background-color: #000000;
    padding: 30px;
    text-align: center;
}

.header img {
    max-width: 180px;
    filter: invert(1);
    width: 100%;
    height: auto;
}

.content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

h1 {
    color: #000000;
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 20px;
    text-align: center;
}

#reader {
    width: 100%;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 40vh;
    overflow: hidden;
}

#reader video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 40vh;
    object-fit: contain;
}

/* Custom scanning box styling */
#reader canvas {
    border: 3px solid #000000 !important;
    border-radius: 0;
    max-height: 40vh;
}

.status-message {
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #000000;
    font-size: 16px;
    font-weight: 700;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-message.success {
    background-color: #000000;
    color: #ffffff;
}

.status-message.error {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.status-message.info {
    background-color: #000000;
    color: #ffffff;
}

.status-message.hidden {
    display: none;
}

/* Hakutulosten näkymä */
.search-results {
    margin: 20px 0;
    padding: 30px;
    border: 2px solid #000000;
    background-color: #ffffff;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-results h2 {
    color: #000000;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

.result-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f4f4f4;
    border: 1px solid #000000;
}

.result-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 5px;
}

.result-value {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    word-break: break-word;
}

.result-value.ticket-id {
    font-family: monospace;
    background-color: #000000;
    color: #ffffff;
    padding: 5px 15px;
    display: inline-block;
    font-weight: bold;
}

.result-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

button {
    background: #000000;
    color: #ffffff;
    border: 4px solid #000000;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Maven Pro', sans-serif;
}

button:hover {
    background: #ffffff;
    color: #000000;
}

button:disabled {
    background: #ccc;
    color: #666;
    border-color: #ccc;
    cursor: not-allowed;
}

button.secondary {
    background: #ffffff;
    color: #000000;
    border: 4px solid #000000;
}

button.secondary:hover {
    background: #000000;
    color: #ffffff;
}

/* Kirjautumislomake */
.login-page {
    min-height: 100vh;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: #ffffff;
    border: 4px solid #000000;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.login-header {
    background-color: #000000;
    padding: 30px;
    text-align: center;
}

.login-header img {
    max-width: 180px;
    filter: invert(1);
    width: 100%;
    height: auto;
}

.login-content {
    padding: 40px 30px;
    text-align: center;
}

.login-content h1 {
    color: #000000;
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.login-input-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #000000;
}

.login-input-group input {
    font-family: 'Maven Pro', sans-serif;
    font-size: 16px;
    padding: 15px;
    border: 4px solid #000000;
    background: #ffffff;
    color: #000000;
    width: 100%;
    box-sizing: border-box;
}

.login-input-group input:focus {
    outline: none;
    background: #f4f4f4;
}

.login-error {
    padding: 15px;
    background-color: #000000;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #000000;
}

.login-error.hidden {
    display: none;
}

.login-button {
    background: #000000;
    color: #ffffff;
    border: 4px solid #000000;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Maven Pro', sans-serif;
}

.login-button:hover {
    background: #ffffff;
    color: #000000;
}

.login-button:disabled {
    background: #ccc;
    color: #666;
    border-color: #ccc;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .container {
        border-width: 2px;
    }

    .content {
        padding: 20px;
    }

    .header {
        padding: 20px;
    }

    .header img {
        max-width: 150px;
    }

    h1 {
        font-size: 20px;
    }

    .status-message {
        font-size: 14px;
        padding: 15px;
    }

    .search-results {
        padding: 20px;
    }

    .result-value {
        font-size: 14px;
    }

    .login-content {
        padding: 30px 20px;
    }

    .login-content h1 {
        font-size: 24px;
    }

    .login-header {
        padding: 20px;
    }

    .login-header img {
        max-width: 150px;
    }
}

/* Versionumero h1:n alla */
.app-version {
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    margin-top: -10px;
    margin-bottom: 15px;
    opacity: 0.7;
}
