/**
 * CVault Member Login Form Styles
 * Modern, clean login form design with Wordfence 2FA support
 */

.cvault-login-wrapper {
    max-width: 450px;
    margin: 40px auto;
}

.cvault-login-container {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #aa67ec;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 40px;
    transition: all 0.3s ease;
}

.cvault-login-container:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cvault-login-container.logged-in {
    text-align: center;
}

.cvault-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.cvault-login-header h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

/* Messages */
.cvault-login-messages {
    margin-bottom: 20px;
}

.cvault-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    animation: slideIn 0.3s ease;
}

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

.cvault-message.error {
    background-color: #fee;
    border-left: 4px solid #dc2626;
    color: #991b1b;
}

.cvault-message.success {
    background-color: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.cvault-message.info {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* Form styles */
.cvault-login-form {
    margin-bottom: 20px;
}

.cvault-form-group {
    margin-bottom: 20px;
}

.cvault-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #ffffff;
}

.cvault-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid #aa67ec;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cvault-form-control:focus {
    outline: none;
    border-color: #aa67ec;
    box-shadow: inset 0 0 0 3px rgba(170, 103, 236, 0.1);
}

.cvault-form-control::placeholder {
    color: #ffffff;
}

/* 2FA Field */
.cvault-2fa-field {
    animation: slideIn 0.3s ease;
}

.cvault-field-description {
    margin-top: 6px;
    font-size: 13px;
    color: #ffffff;
    line-height: 1.4;
}

/* Remember Me */
.cvault-remember-me {
    display: flex;
    align-items: center;
}

.cvault-remember-me label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 400;
}

.cvault-remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    cursor: pointer;
    accent-color: #aa67ec;
}

/* Login Button */
.cvault-login-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #aa67ec 0%, #8a4fd8 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.cvault-login-button:hover {
    background: linear-gradient(135deg, #9855d4 0%, #7a3fc6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(170, 103, 236, 0.3);
}

.cvault-login-button:active {
    transform: translateY(0);
}

.cvault-login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cvault-login-button .button-text {
    transition: opacity 0.2s ease;
}

.cvault-login-button.loading .button-text {
    opacity: 0;
}

/* Spinner */
.button-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Footer Links */
.cvault-login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 12px;
}

.cvault-login-footer a {
    font-size: 14px;
    color: #aa67ec;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.cvault-login-footer a:hover {
    color: #8a4fd8;
    text-decoration: underline;
}

/* Logged In State */
.cvault-login-message {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 20px;
}

.cvault-login-message p {
    margin: 10px 0;
    font-size: 15px;
    color: #ffffff;
}

.cvault-logout-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 24px;
    background-color: #aa67ec;
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cvault-logout-link:hover {
    background-color: #8a4fd8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(170, 103, 236, 0.3);
}

/* 2FA Management Styles */
.cvault-2fa-management {
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #aa67ec;
    border-radius: 20px;
}

.cvault-2fa-management h3 {
    color: #ffffff;
    margin-bottom: 20px;
}

.cvault-2fa-status {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.status-enabled {
    color: #10b981;
    font-weight: bold;
}

.status-disabled {
    color: #ef4444;
    font-weight: bold;
}

.cvault-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.cvault-btn-primary {
    background: linear-gradient(135deg, #aa67ec 0%, #8a4fd8 100%);
    color: #ffffff;
}

.cvault-btn-primary:hover {
    background: linear-gradient(135deg, #9855d4 0%, #7a3fc6 100%);
    transform: translateY(-1px);
}

.cvault-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.cvault-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}

#cvault-2fa-setup {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

#cvault-qr-code {
    text-align: center;
    margin: 20px 0;
}

#cvault-qr-code img {
    border: 2px solid #aa67ec;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

#cvault-secret-code {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #aa67ec;
    font-weight: bold;
    letter-spacing: 2px;
}

#cvault-verification-step {
    margin-top: 20px;
}

#cvault-verification-step label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

#cvault-verification-code {
    width: 120px;
    padding: 10px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #aa67ec;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    margin-right: 10px;
}

#cvault-verification-code:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(170, 103, 236, 0.3);
}

#cvault-backup-codes-list {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #ffffff;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 480px) {
    .cvault-login-wrapper {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .cvault-login-container {
        padding: 30px 20px;
    }
    
    .cvault-login-header h3 {
        font-size: 24px;
    }
    
    .cvault-form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .cvault-login-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .cvault-2fa-management {
        margin: 10px;
        padding: 15px;
    }
    
    #cvault-verification-code {
        width: 100px;
        font-size: 16px;
    }
}
