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

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Roboto",
        "Helvetica Neue",
        Arial,
        sans-serif;
    background: none;
    min-height: 100vh;
    min-width: 768px;
}

body.mop-theme {
    /* reset style from login-pf */
    background: none;
    background-color: var(--brand-brand-0);
}


/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-h2);
    line-height: var(--line-height-h2);
}

h6 {
    font-size: var(--font-size-h6);
    line-height: var(--line-height-h6);
}

p {
    margin: 0;
    font-size: var(--font-size-md);
    font-weight: 400;
    line-height: var(--line-height-md);
}

.mop-theme p + p {
    margin-top: var(--spacing-lg);
}

.mop-theme p + form {
    margin-top: var(--spacing-lg);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Utility classes */
.text-secondary {
    color: var(--secondary-secondary-0);
}

/* Button */
.button,
.mop-theme button {
    display: block;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    line-height: 18px;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    height: var(--button-height-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    background: var(--brand-brand-6);
    color: var(--button-color-filled);
}

.button:hover:not(:disabled),
.mop-theme button:hover:not(:disabled) {
    background: var(--brand-brand-7);
}

.button:disabled,
.mop-theme button:disabled {
    background: var(--gray-gray-3);
    color: var(--button-color-disabled);
    cursor: not-allowed;
}

.button.fullwidth,
.mop-theme button.fullwidth {
    width: 100%;
}

/* Input */
.input,
.mop-theme input[type="text"],
.mop-theme input[type="password"] {
    border: 1px solid var(--gray-gray-2);
    border-radius: var(--border-radius-md);
    background: var(--white);
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    padding: 10px var(--spacing-lg);
    height: 38px;
    color: var(--gray-gray-9);
    transition: border-color 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.input::placeholder,
.mop-theme input[type="text"]::placeholder,
.mop-theme input[type="password"]::placeholder {
    color: var(--gray-gray-5);
}

.input:focus,
.mop-theme input[type="text"]:focus,
.mop-theme input[type="password"]:focus {
    border-color: var(--brand-brand-6);
    outline: none;
}

.input:disabled,
.mop-theme input[type="text"]:disabled,
.mop-theme input[type="password"]:disabled {
    background: var(--gray-gray-1);
    color: var(--gray-gray-5);
    cursor: not-allowed;
}

.input[data-error="true"],
.mop-theme input[type="text"][data-error="true"],
.mop-theme input[type="password"][data-error="true"] {
    border-color: var(--red-red-6);
}

.input[data-error="true"]:focus,
.mop-theme input[type="text"][data-error="true"]:focus,
.mop-theme input[type="password"][data-error="true"]:focus {
    border-color: var(--red-red-6);
}

/* Error message */
.error-message {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-sm);
    color: var(--red-red-6);
    margin-top: var(--spacing-sm);
    display: none;
}

.error-message.visible {
    display: block;
}

/* Input wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Password input wrapper */
.password-wrapper {
    position: relative;
}

.mop-theme input.password-input {
        padding-inline-end: calc(var(--spacing-lg) + 22px);
}

.password-toggle,
.mop-theme .password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-gray-6);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: 34px;
    height: 100%;
}

.password-toggle:hover,
.mop-theme .password-toggle:hover:not(:disabled) {
    color: var(--gray-gray-9);
    background-color: transparent;
}

.password-toggle .fa-eye-slash { display: none; }

.password-toggle[aria-pressed="true"] .fa-eye { display: none; }
.password-toggle[aria-pressed="true"] .fa-eye-slash { display: block; }

/* Link */
.link,
.mop-theme a {
    display: inline;
    font-size: var(--font-size-h6);
    font-weight: 700;
    line-height: var(--line-height-h6);
    color: var(--brand-brand-6);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.link:hover,
.mop-theme a:hover {
    color: var(--brand-brand-7);
}

.link-with-icon {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Stack layouts */
.stack {
    display: flex;
    flex-direction: column;
}

.stack.gap-sm {
    gap: var(--spacing-sm);
}

.stack.gap-md {
    gap: var(--spacing-md);
}

.stack.gap-lg {
    gap: var(--spacing-lg);
}

.stack.gap-xl {
    gap: var(--spacing-xl);
}

.stack.gap-40 {
    gap: 40px;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1px solid var(--gray-gray-2);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-input:checked {
    background: var(--brand-brand-6);
    border-color: var(--brand-brand-6);
}

.checkbox-input:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M13.3333 4L6 11.3333L2.66667 8' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.checkbox-input:disabled {
    cursor: not-allowed;
    background: var(--gray-gray-3);
    border-color: var(--gray-gray-4);
}

.checkbox-input:disabled:checked {
    background: var(--gray-gray-3);
    border-color: var(--gray-gray-4);
}

.checkbox-label {
    padding-inline-start: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: var(--gray-gray-9);
    cursor: pointer;
}

.checkbox-container:has(.checkbox-input:disabled) .checkbox-label {
    color: var(--gray-gray-4);
    cursor: not-allowed;
}


.small {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-sm);
}


.form-group {
    margin-bottom: 16px;
}
