/* Modern Token Access Page Styling */

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

html,
body.page-frontendaccess {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

body.page-frontendaccess .page-wrapper,
body.page-frontendaccess .page-main {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* Full-screen background with gradient (using CSS variables) */
.token-access-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--gradient-start, #667eea) 0%, var(--gradient-end, #764ba2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Background image overlay */
.token-access-wrapper.has-background-image::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

/* Animated background elements (only when no background image) */
.token-access-wrapper:not(.has-background-image)::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: float 8s ease-in-out infinite;
}

.token-access-wrapper:not(.has-background-image)::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
}

/* Main card with glassmorphism effect */
.token-access-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 100%;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo/Icon area */
.token-access-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--gradient-start, #667eea) 0%, var(--gradient-end, #764ba2) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.token-access-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

/* Custom logo styling */
.token-access-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.token-access-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Title */
.token-access-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.token-access-subtitle {
    text-align: center;
    font-size: 14px;
    color: #718096;
    margin-bottom: 32px;
}

/* Form styling */
.token-access-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.token-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.token-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 6px;
}

.token-form-label svg {
    width: 18px;
    height: 18px;
    stroke: #667eea;
}

/* Input styling */
.token-form-input {
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: #f7fafc;
    color: #1a202c;
    font-family: inherit;
}

.token-form-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.token-form-input::placeholder {
    color: #a0aec0;
}

/* Submit button */
.token-form-submit {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 8px;
}

.token-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.token-form-submit:active {
    transform: translateY(0);
}

/* Messages styling */
.token-messages {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    animation: slideDown 0.4s ease-out;
}

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

.token-messages .message {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.token-messages .message-error {
    background: #fed7d7;
    color: #c53030;
    border-left: 4px solid #f56565;
}

.token-messages .message-success {
    background: #c6f6d5;
    color: #2f855a;
    border-left: 4px solid #48bb78;
}

/* Footer text */
.token-access-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #a0aec0;
}

/* Responsive design */
@media (max-width: 480px) {
    .token-access-card {
        padding: 32px 24px;
    }

    .token-access-title {
        font-size: 24px;
    }

    .token-access-icon {
        width: 64px;
        height: 64px;
    }

    .token-access-icon svg {
        width: 32px;
        height: 32px;
    }
}

/* Loading state */
.token-form-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.token-form-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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