/**
 * Professor Lex Plugin Styles
 * Styling for the chat integration buttons and components
 */

/* Base button styles */
.lexprof-chat-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.lexprof-chat-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lexprof-chat-button:active {
    transform: translateY(0);
}

/* Primary button style - Light Mode
 * Features warm orange gradient (#f47c48 to #ff8a65)
 * Perfect for light backgrounds and welcoming interactions
 */
.lexprof-button-primary {
    background: linear-gradient(135deg, #f47c48 0%, #ff8a65 100%);
    color: white;
    border: 2px solid #f47c48;
    box-shadow: 0 2px 8px rgba(244, 124, 72, 0.25);
}

.lexprof-button-primary:link,
.lexprof-button-primary:visited {
    color: white;
}

.lexprof-button-primary:hover {
    background: linear-gradient(135deg, #e36b3f 0%, #f47c48 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(244, 124, 72, 0.35);
    border-color: #e36b3f;
}

.lexprof-button-primary:focus {
    outline: 2px solid #f47c48;
    outline-offset: 2px;
    color: white;
}

.lexprof-button-primary:active {
    background: linear-gradient(135deg, #d45d36 0%, #e36b3f 100%);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(244, 124, 72, 0.3);
    color: white;
}

/* Secondary button style - Dark Mode
 * Features cool blue gradient (#294a70 to #335577) with dark gray border (#535675)
 * Perfect for dark themes and professional appearances
 */
.lexprof-button-secondary {
    background: linear-gradient(135deg, #294a70 0%, #335577 100%);
    color: #E4E4E4;
    border: 2px solid #535675;
    box-shadow: 0 2px 8px rgba(41, 74, 112, 0.25);
}

.lexprof-button-secondary:hover {
    background: linear-gradient(135deg, #1e3a5f 0%, #294a70 100%);
    color: white;
    border-color: #535675;
    box-shadow: 0 4px 16px rgba(41, 74, 112, 0.35);
}

.lexprof-button-secondary:focus {
    outline: 2px solid #535675;
    outline-offset: 2px;
}

.lexprof-button-secondary:active {
    background: linear-gradient(135deg, #152a4a 0%, #1e3a5f 100%);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(41, 74, 112, 0.3);
}

/* Status messages */
.lexprof-login-required,
.lexprof-access-denied,
.lexprof-error {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.lexprof-login-required {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.lexprof-access-denied {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.lexprof-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Responsive design */
@media (max-width: 768px) {
    .lexprof-chat-button {
        display: block;
        width: 100%;
        margin: 10px 0;
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Loading state (for future use) */
.lexprof-chat-button.loading {
    position: relative;
    color: transparent;
}

.lexprof-chat-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: lexprof-spin 0.8s linear infinite;
}

@keyframes lexprof-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WordPress admin styles compatibility */
.wp-admin .lexprof-chat-button {
    margin: 5px 10px 5px 0;
}

/* Dark mode support - enhances existing button styles */
@media (prefers-color-scheme: dark) {
    /* Light mode button gets slightly adjusted for dark environments */
    .lexprof-button-primary {
        box-shadow: 0 2px 8px rgba(244, 124, 72, 0.4);
    }
    
    .lexprof-button-primary:hover {
        box-shadow: 0 4px 16px rgba(244, 124, 72, 0.5);
    }
    
    /* Dark mode button gets enhanced contrast */
    .lexprof-button-secondary {
        background: linear-gradient(135deg, #1e3a5f 0%, #294a70 100%);
        border-color: #535675;
        box-shadow: 0 2px 8px rgba(83, 86, 117, 0.4);
    }
    
    .lexprof-button-secondary:hover {
        background: linear-gradient(135deg, #152a4a 0%, #1e3a5f 100%);
        box-shadow: 0 4px 16px rgba(83, 86, 117, 0.5);
    }
    
    .lexprof-login-required {
        background-color: rgba(244, 124, 72, 0.1);
        color: #f47c48;
        border-color: rgba(244, 124, 72, 0.3);
    }
    
    .lexprof-access-denied,
    .lexprof-error {
        background-color: rgba(220, 38, 38, 0.1);
        color: #fca5a5;
        border-color: rgba(220, 38, 38, 0.3);
    }
}

/* Animation for button appearance */
.lexprof-chat-button {
    animation: lexprof-fadeIn 0.3s ease-out;
}

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

/* Focus styles for accessibility */
.lexprof-chat-button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .lexprof-chat-button {
        border: 2px solid ButtonText;
    }
}