* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #c3d5db 0%, #ffffff 100%);
    color: #333;
}

/* Header styles */
.app-header {
    padding: 20px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: fixed; /* Gör headern fast i toppen */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Säkerställer att headern ligger överst */
}

.user-email {
    margin-right: 15px;
    font-size: 16px;
    color: #495057;
}

.logout-button {
    background-color: #ef5c6a;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.logout-button:hover {
    background-color: #c82333;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.payment-screen, .payment-form {
    background-color: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo {
    margin-bottom: 40px;
    width: 60%;
    max-width: 200px;
}

.bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 20px;
}   

.z-index-zero{
    z-index: -1000;
}

.logo img {
    width: 100%;
    height: auto;
}

.pay-button {
    background-color: #4BB4E6;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.pay-button:hover {
    background-color: #3a9ecc;
}

.payment-form {
    width: 100%;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.back-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #4BB4E6;
    margin-right: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.back-button:hover {
    background-color: rgba(75, 180, 230, 0.1);
    color: #3a9ecc;
    transform: translateX(-2px);
}

.back-button:active {
    transform: translateX(-1px);
    background-color: rgba(75, 180, 230, 0.15);
}

.back-button svg {
    width: 24px;
    height: 24px;
    display: block;
}

.form-header h2 {
    flex-grow: 1;
    text-align: center;
    color: #333;
}

.form-group {
    width: 100%;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #484848;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.button,
#login-btn,
#verify-2fa-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.button:hover,
#login-btn:hover,
#verify-2fa-btn:hover {
    background-color: #0056b3;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.button:focus,
#login-btn:focus,
#verify-2fa-btn:focus {
    background-color: #0056b3;
    outline: 2px solid #004085;
    outline-offset: 1px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.button:disabled,
#login-btn:disabled,
#verify-2fa-btn:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.status-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.error {
    background-color: #ffebee;
    color: #d32f2f;
    border-color: #f5c6cb;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #4BB4E6;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    .payment-screen, .payment-form {
        padding: 40px;
    }
}

/* Styling för detalj-knappen */
.details-button {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 16px;
    background-color: #e0e0e0;
    color: #424242;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.details-button:hover {
    background-color: #bdbdbd;
}

/* Styling för betalningsdetaljer */
.payment-details {
    margin-top: 16px;
    padding: 16px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

.payment-details dl {
    margin: 0;
    display: grid;
    grid-template-columns: 40% 60%;
    row-gap: 8px;
}

.payment-details dt {
    font-weight: bold;
    color: #616161;
}

.payment-details dd {
    margin: 0;
    color: #212121;
}

/* Göm betalningsdetaljer per standardl */
.payment-debug-info {
    display: none;
}

.payout-history {
    margin-top: 2rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
}

.payout-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.payout-item p {
    margin: 0.5rem 0;
}

/* Login form styling */
.login-form {
    background-color: #fff;
    width: 100%;
    max-width: 650px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
}

.login-form .login-logo {
    margin-bottom: 30px;
    width: 70%;
    max-width: 220px;
}

.login-form h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
}

#login-form-content {
    width: 85%;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
    display: none;
}

#login-step-1,
#login-step-2 {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#login-step-1.is-hidden,
#login-step-2.is-hidden {
    display: none !important;
}

.form-group {
    width: 100%;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.form-group-checkbox {
    margin-bottom: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    accent-color: #ef5c6a;
}

.digital-receipt-fields {
    width: 100%;
}

@media (min-width: 768px) {
    .login-form {
        padding: 40px;
    }
}

/* MFA setup – samma designsystem som login-form */
.mfa-setup-form {
    align-items: stretch;
    max-width: 520px;
}

.mfa-setup-form > * {
    width: 100%;
}

.mfa-intro {
    color: #6b7280;
    text-align: center;
    margin: -16px 0 24px;
    font-size: 15px;
    line-height: 1.5;
}

.mfa-section {
    margin-bottom: 8px;
}

.mfa-section h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.mfa-section p {
    color: #555;
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 16px;
}

.mfa-hint {
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
    color: #6b7280 !important;
}

.mfa-status {
    margin-bottom: 16px;
}

.mfa-status:empty {
    display: none;
    margin: 0;
}

.mfa-status p {
    margin: 0;
}

.mfa-status a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.status-message.info {
    background-color: #e8f4fc;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.qr-code-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

#qr-code-image {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#qr-code-image img,
#qr-code-image canvas {
    border-radius: 8px;
}

.secret-key-block {
    text-align: left;
}

.secret-key-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
}

.secret-key-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    word-break: break-all;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
}

.qr-uri-details {
    margin-top: 16px;
    text-align: left;
}

.qr-uri-details summary {
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    user-select: none;
}

.qr-uri-details summary:hover {
    color: #374151;
}

.qr-uri-value {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: 'Courier New', Courier, monospace;
}

.mfa-setup-form .button:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
} 

/* Stilar för bekräftelsedialogen (modal) */
.modal {
    display: none; /* Dold som standard */
    position: fixed; /* Stannar kvar även om man scrollar */
    z-index: 1000; /* Se till att den ligger överst */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Scroll om innehållet är för stort */
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.modal[style*="flex"] {
    display: flex !important;
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    text-align: center;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bekräftelsedialog specifik styling */
.confirmation-modal-content {
    padding: 40px 32px 32px;
}

.modal-icon {
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 24px;
}

.confirmation-icon {
    background: linear-gradient(135deg, #4BB4E6 0%, #3a9ecc 100%);
    color: white;
    margin-bottom: 24px;
}

.success-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    margin-bottom: 24px;
}

.modal-title {
    margin: 0 0 16px;
    color: #1f2937;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.success-title {
    color: #10b981;
    margin-bottom: 24px;
}

.modal-description {
    margin: 0 0 24px;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
}

.amount-highlight {
    color: #4BB4E6;
    font-size: 20px;
    font-weight: 700;
    display: inline-block;
    padding: 4px 12px;
    border: 2px solid #4BB4E6;
    border-radius: 8px;
    background-color: rgba(75, 180, 230, 0.1);
}

.payment-details-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 0 0 32px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

/* Success modal specifik styling */
.success-modal-content {
    padding: 48px 32px 32px;
}

.success-message-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 24px;
    margin: 0 0 24px;
}

.success-message {
    margin: 0 0 12px;
    font-size: 14px;
    color: #065f46;
    font-weight: 500;
}

.success-phone {
    margin: 0 0 8px;
    font-size: 20px;
    color: #047857;
    font-weight: 700;
}

.success-amount {
    margin: 0;
    font-size: 18px;
    color: #065f46;
    font-weight: 600;
}

.success-amount strong {
    color: #047857;
    font-size: 22px;
}

.logout-warning-box {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px;
    margin: 0 0 32px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warning-icon {
    color: #d97706;
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-text {
    margin: 0;
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
    text-align: left;
    flex: 1;
}

.countdown-highlight {
    color: #d97706;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.modal-content p {
    margin-bottom: 10px;
    font-size: 16px;
    color: #555;
}

.modal-content p strong {
    font-weight: 700;
    color: #333;
}

/* Inaktivitetsdialog – samma designspråk som login-form */
.inactivity-modal-content {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 40px 32px 32px;
    margin: 20px auto;
    max-width: 480px;
}

.inactivity-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    width: 72px;
    height: 72px;
}

.inactivity-warning-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 0 32px;
}

.inactivity-warning-text {
    margin: 0 !important;
    font-size: 15px !important;
    color: #555 !important;
    line-height: 1.55;
}

.inactivity-warning-text .countdown-highlight {
    display: inline-block;
    min-width: 1.5em;
    text-align: center;
}

.modal-buttons {
    margin-top: 0;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-buttons .button {
    flex: 1;
    min-width: 140px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.button-primary-confirm {
    background: linear-gradient(135deg, #4BB4E6 0%, #3a9ecc 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(75, 180, 230, 0.4);
}

.button-primary-confirm:hover {
    background: linear-gradient(135deg, #3a9ecc 0%, #2d8bb8 100%);
    box-shadow: 0 6px 16px rgba(75, 180, 230, 0.5);
    transform: translateY(-1px);
}

.button-primary-confirm:active {
    transform: translateY(0);
}

.button-primary-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.button-primary-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.button-primary-success:active {
    transform: translateY(0);
}

.button-logout {
    background-color: #ef5c6a;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(239, 92, 106, 0.35);
}

.button-logout:hover {
    background-color: #c82333;
    box-shadow: 0 6px 16px rgba(239, 92, 106, 0.45);
    transform: translateY(-1px);
}

.button-logout:active {
    transform: translateY(0);
}

.button-logout:focus {
    outline: 2px solid #ef5c6a;
    outline-offset: 2px;
}

.button-secondary {
    background-color: #ffffff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.button-secondary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.button-secondary:active {
    transform: translateY(0);
}

.button-secondary:focus {
    outline: 2px solid #4BB4E6;
    outline-offset: 2px;
}

/* Responsiv design för modaler */
@media (max-width: 640px) {
    .modal {
        padding: 16px;
    }
    
    .modal-content {
        border-radius: 16px;
    }
    
    .confirmation-modal-content,
    .success-modal-content,
    .inactivity-modal-content {
        padding: 32px 24px 24px;
        margin: 16px auto;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .button {
        width: 100%;
    }
    
    .payment-details-box {
        padding: 16px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
} 