/* Rate Checker Component Styles */

.rate-checker {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 45px 0 80px;
    padding: 60px;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: 0px 4px 38px 0px rgba(156, 25, 206, 0.10);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.rate-checker h2 {
    color: #040222;
    font-size: 25px;
    line-height: 34px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.rate-checker form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    gap: 24px;
}

.rate-checker .form-row {
    display: flex;
    gap: 16px;
    width: 100%;
}

.rate-checker .form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.rate-checker label {
    font-size: 14px;
    line-height: 19px;
    color: #1E293B;
    font-weight: 500;
}

.rate-checker select,
.rate-checker input {
    padding: 16px;
    border: 1px solid #D2DAE4;
    border-radius: 8px;
    font-size: 16px;
    line-height: 22px;
    color: #040222;
    background-color: #ffffff;
    transition: all 0.2s ease-in;
    font-family: 'Manrope-Regular', sans-serif;
}

.rate-checker select:focus,
.rate-checker input:focus {
    outline: none;
    border-color: #8F27C7;
    box-shadow: 0 0 0 3px rgba(143, 39, 199, 0.1);
}

.rate-checker select:hover,
.rate-checker input:hover {
    border-color: #C98DE9;
}

.rate-checker button {
    padding: 16px 32px;
    background-color: #8F27C7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in;
    margin-top: 0;
}

.rate-checker button:hover {
    background-color: #C98DE9;
}

.rate-checker button:active {
    background-color: #570086;
}

.rate-checker button:disabled {
    background-color: #D2DAE4;
    cursor: not-allowed;
}

/* Loading state for button */
.rate-checker button[data-attach-loading] {
    position: relative;
}

.rate-checker button.oc-loading {
    color: transparent;
}

.rate-checker button.oc-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

#result-display {
    margin-top: 0;
    padding: 16px;
    background-color: #FCF8FF;
    border-radius: 8px;
    border: 1px solid #E4C6F4;
    text-align: center;
    animation: slideInFade 0.4s ease-out;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Turnstile animation */
#turnstile-status {
    transition: all 0.3s ease-out;
}

#turnstile-status .form-group {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#result-display p {
    margin: 0;
    font-size: 16px;
    line-height: 22px;
    color: #040222;
}

#result-display strong {
    color: #8F27C7;
    font-weight: 600;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .rate-checker {
        margin: 20px;
        padding: 30px 20px;
        border-radius: 16px;
    }

    .rate-checker h2 {
        font-size: 20px;
        line-height: 28px;
        margin-bottom: 20px;
    }

    .rate-checker .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .rate-checker form {
        gap: 20px;
    }

    .rate-checker select,
    .rate-checker input {
        padding: 14px;
        font-size: 16px;
    }

    .rate-checker button {
        padding: 16px;
        font-size: 16px;
    }
}

@media (max-width: 500px) {
    .rate-checker {
        margin: 10px;
        padding: 20px 15px;
    }

    .rate-checker h2 {
        font-size: 18px;
        line-height: 24px;
    }

    .rate-checker select,
    .rate-checker input {
        padding: 12px;
        font-size: 14px;
    }
}