@font-face {
    font-family: 'AdpFont';
    src: url('/fonts/ADPortsGroup/ADPortsGroup-Regular.woff2') format('woff2'), url('~/fonts/ADPortsGroup/ADPortsGroup-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@view-transition {
    navigation: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "AdpFont", "sans-serif";
}

body {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/portsBackground.avif') no-repeat center center;
    background-size: cover;
    transition: transform 0s ease;
    z-index: -2;
}

html[dir="rtl"] body::before {
    transform: scaleX(-1);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.account-container {
    width: 380px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    margin: 0 140px;
    animation: fadeIn 0.5s;
}

.reset-container, .login-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    height: 100%;
}

.reset-container.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.account-container img {
    width: 210px;
}

form div {
    padding-bottom: 20px;
}

.top-row {
    padding-bottom: 60px;
}

.input-wrapper {
    position: relative;
    height: 4em;
}

.input-wrapper:has(.field-validation-error) {
    margin-bottom: 0.5em;
}

.input-wrapper .icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #1d1d3a;
    color: white;
    border: 1px solid #111133;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button .spinner-border {
    display: none !important;
}

button.is-loading .spinner-border {
    display: inline-block !important;
}

button:hover {
    background-color: #111133;
}

.input-wrapper .icon {
    position: absolute;
    left: 10px;
    top: 33%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
    line-height: 1;
}

html[dir="rtl"] .input-wrapper .icon {
    left: auto;
    right: 10px;
}

html[dir="ltr"] .input-wrapper input {
    padding: 10px 10px 10px 35px;
}

html[dir="rtl"] .input-wrapper input {
    padding: 10px 35px 10px 10px;
}

.link-action {
    color: #61b8eb;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none !important;
}

.welcome-title {
    color: #284579;
}

.welcome-text {
    color: #2d3955;
    margin-top: -8px;
}

.back-button {
    display: inline-block;
    margin-bottom: 15px;
    cursor: pointer;
    color: #61b8eb;
    font-weight: bold;
}

.text-danger,
.field-validation-error {
    color: red !important;
    font-size: 0.875rem;
}

.validation-summary-valid {
    display: none;
}

.lang-select {
    width: 7em;
    line-height: 1.5em;
    padding: 8px 21px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><polygon points='0,0 10,0 5,6' fill='%23333'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
}

.lang-select:hover {
    border-color: #1a3a8f;
    box-shadow: 0 0 5px rgba(26, 58, 143, 0.2);
}

.lang-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.3);
}

html[dir="rtl"] .lang-select {
    text-align: right;
    background-position: left 10px center;
}

html[dir="ltr"] .lang-select {
    text-align: left;
    background-position: right 10px center;
}

@media (max-width: 768px) {
    .account-container {
        width: 90%;
        padding: 20px;
    }
}

@media (max-width: 950px) {
    body {
        justify-content: center;
    }

    .account-container {
        background-color: white;
        width: 90%;
        padding: 20px;
        margin: 0;
    }

    body::after {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 1200px) {
    .account-container {
        margin: 0 20px;
    }
}
