/**
 * DQ Login Form Styles
 * Login form for Dominus QuickBooks /access page
 * Styled to match dashboard components
 */

/* Base wrapper */
.dq-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Login container */
.dq-login-container {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header section */
.dq-login-header {
    background: linear-gradient(180deg, #0a6b72 0%, #085f65 100%);
    color: #fff;
    padding: 30px 30px 25px;
    text-align: center;
}

.dq-login-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.dq-login-header p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

/* Success icon for logged in state */
.dq-success-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #4fd1c5;
    display: block;
    margin: 0 auto 15px;
}

/* Form styles */
.dq-login-form {
    padding: 30px;
}

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

.dq-form-group:last-child {
    margin-bottom: 0;
}

.dq-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.dq-form-group label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #0996a0;
}

.dq-form-group input[type="text"],
.dq-form-group input[type="password"],
.dq-form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f8fafb;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.dq-form-group input[type="text"]:focus,
.dq-form-group input[type="password"]:focus,
.dq-form-group input[type="email"]:focus {
    outline: none;
    border-color: #0996a0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(9, 150, 160, 0.1);
}

.dq-form-group input[type="text"]::placeholder,
.dq-form-group input[type="password"]::placeholder,
.dq-form-group input[type="email"]::placeholder {
    color: #999;
}

/* Checkbox styles */
.dq-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dq-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    color: #555;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.dq-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0996a0;
    cursor: pointer;
}

/* Submit button */
.dq-login-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0996a0 0%, #077a82 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    text-align: center;
}

.dq-login-button:hover {
    background: linear-gradient(135deg, #077a82 0%, #06686f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(9, 150, 160, 0.3);
}

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

.dq-login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinning animation */
.dq-spin {
    animation: dq-spin 1s linear infinite;
}

@keyframes dq-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Error message */
.dq-login-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dq-login-error::before {
    content: "\f534";
    font-family: dashicons;
    font-size: 18px;
}

/* Success message */
.dq-login-success {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dq-login-success::before {
    content: "\f147";
    font-family: dashicons;
    font-size: 18px;
}

/* Footer section */
.dq-login-footer {
    padding: 0 30px 25px;
    text-align: center;
}

.dq-forgot-password {
    font-size: 14px;
    color: #0996a0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dq-forgot-password:hover {
    color: #077a82;
    text-decoration: underline;
}

/* Logged in state */
.dq-logged-in .dq-login-info {
    padding: 30px;
    text-align: center;
}

.dq-logged-in .dq-login-info p {
    margin: 0;
    font-size: 15px;
    color: #555;
}

.dq-logged-in .dq-login-info strong {
    color: #333;
}

.dq-login-actions {
    padding: 0 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.dq-logout-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dq-logout-link:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* Logout confirmation message */
.dq-logout-message {
    width: 100%;
    max-width: 420px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dq-logout-message .dq-success-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #166534;
    margin: 0;
}

.dq-logout-message p {
    margin: 0;
    font-size: 15px;
    color: #166534;
    font-weight: 500;
}

/* Dashicons */
.dashicons {
    font-family: dashicons;
    display: inline-block;
    line-height: 1;
    font-weight: 400;
    font-style: normal;
    speak: never;
    text-decoration: inherit;
    text-transform: none;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    vertical-align: top;
}

/* Responsive styles */
@media (max-width: 480px) {
    .dq-login-wrapper {
        padding: 20px 15px;
    }

    .dq-login-header {
        padding: 25px 20px 20px;
    }

    .dq-login-header h2 {
        font-size: 22px;
    }

    .dq-login-form {
        padding: 25px 20px;
    }

    .dq-login-footer {
        padding: 0 20px 20px;
    }

    .dq-logged-in .dq-login-info {
        padding: 25px 20px;
    }

    .dq-login-actions {
        padding: 0 20px 25px;
    }
}
