/* DoMate Keycloak Theme - Custom Styles */

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

body.domate-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(291.98deg, #DFFDFF 2.25%, #DEECFF 97.59%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.domate-container {
    width: 100%;
    max-width: 498px;
    margin: 0 auto;
    min-width: 320px;
}

.domate-card {
    background: #FFFFFF;
    border-radius: 25px;
    padding: 44px 69px 35px;
    box-shadow: 0px 1px 4px 0px #0C0C0D0D;
    backdrop-filter: blur(10px);
    text-align: center;
}

/* Logo Styles */
.domate-logo {
    height: 33px;
    margin-bottom: 30px;
}

.domate-logo svg {
    height: 33px;
    width: 103px;
}

/* Title Styles */
.domate-title h1 {
    color: #868787;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    margin-bottom: 86px;
    line-height: 100%;
}

/* On pages with description, reduce title bottom margin */
.domate-card:has(.domate-description) .domate-title h1 {
    margin-bottom: 42px;
}

/* Description text (e.g. reset password page) */
.domate-description {
    text-align: center;
    margin-bottom: 40px;
}

.domate-description p {
    color: #868787;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
}

/* Inline form message (e.g. "email sent" on reset password) */
.domate-form-message {
    text-align: center;
    margin-top: -1px;
    margin-bottom: 25px;
}

.domate-form-message p {
    color: #868787;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Styles */
.domate-form-group {
    position: relative;
    margin-bottom: 26px;
}

.domate-input {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid #C7C9C9;
    font-size: 14px;
    padding: 10px;
    padding-right: 34px;
    color: #334155;
    transition: all 0.3s ease;
    outline: none;
}

.domate-input::placeholder {
    color: #868787;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
}

.domate-input:focus {
    border-bottom-color: #01B2BF;
}

.domate-input[readonly] {
    color: #868787;
    cursor: default;
}

/* Убираем всплывающий заголовок в полях ввода */
.domate-input:focus::placeholder {
    opacity: 1;
    transform: none;
}

.domate-input:not(:placeholder-shown)::placeholder {
    opacity: 1;
    transform: none;
}

/* Дополнительно можно убрать любые анимации плейсхолдера */
.domate-input::placeholder {
    transition: none;
    transform: none;
}

.domate-input-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: #868787;
    transition: color 0.3s ease;
    pointer-events: none;
    margin-right: 10px;
}

.domate-input:focus + .domate-input-icon {
    color: #01B2BF;
}

.password-toggle {
    cursor: pointer;
    pointer-events: auto;
}

.password-toggle:hover {
    color: #4dd0e1;
}

/* When "Forgot password?" is hidden, 90px gap between password and button */
.domate-form-group + .domate-form-group:has(.domate-btn-primary) {
    margin-top: 64px;
}

/* Reset large gap when alert is between inputs and button */
.alert + .domate-form-group:has(.domate-btn-primary) {
    margin-top: 0;
}

/* Button Styles */
.domate-btn {
    width: 100%;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    text-transform: none;
    letter-spacing: 0%;
    line-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.domate-btn-primary {
    background: #01B2BF;
    color: white;
    height: 50px;
    box-shadow: 0px 4px 4px 0px #00000033;
}

.domate-btn-primary:hover {
    background: #00A1AD;
}

/* Links */
.domate-forgot-password {
    text-align: right;
    margin-top: 20px;
    margin-bottom: 50px;
}

.domate-forgot-password a {
    color: #868787;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    transition: color 0.3s ease;
}

.domate-forgot-password a:hover {
    color: #26c6da;
    text-decoration: underline;
}

.domate-register-link {
    text-align: center;
}

.domate-register-link p {
    color: #868787;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
}

.domate-register-link a {
    color: #00A9B5;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    margin-left: 50px;
    transition: color 0.3s ease;
}

.domate-register-link a:hover {
    color: #26c6da;
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    margin-bottom: 24px;
    padding: 0 16px;
}

.alert-error {
    color: #E40544;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 4px;
    border: 1px solid #E40544;
    background: rgba(228, 5, 68, 0.05);
    min-height: 50px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

/* Responsive Design */
@media (max-width: 767px) {
    .domate-card {
        padding: 44px 20px 35px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.domate-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Input focus animation */
.domate-input {
    position: relative;
}

.domate-input:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        border-bottom-color: #e2e8f0;
    }
    100% {
        border-bottom-color: #4dd0e1;
    }
}
