/**
 * WP Exam Engine - Material UI Styles
 * Material Design inspired UI components
 *
 * @package WPEE
 */

/* Material Card */
.wpee-material-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07), 0 1.5px 4px rgba(0,0,0,0.08);
    border-radius: 8px;
    background: #fff;
    padding: 2em;
    margin: 2em auto;
    max-width: 450px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.wpee-material-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.1);
}

/* Banner/Image Section */
.wpee-banner {
    height: 140px;
    border-radius: 8px 8px 0 0;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
    margin: -2em -2em 1.5em -2em;
    position: relative;
    overflow: hidden;
}

.wpee-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
}

/* Title */
.wpee-title {
    margin: 0 0 0.5em 0;
    color: #212121;
    font-size: 1.75em;
    font-weight: 500;
    line-height: 1.3;
}

/* Description */
.wpee-desc {
    color: #757575;
    margin-bottom: 1.5em;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Form */
.wpee-form {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

/* Material Input */
.wpee-input,
.wpee-material-input {
    padding: 14px 16px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    color: #212121;
    width: 100%;
    box-sizing: border-box;
}

.wpee-input:focus,
.wpee-material-input:focus {
    outline: none;
    border-color: #1976D2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.wpee-input::placeholder,
.wpee-material-input::placeholder {
    color: #9e9e9e;
}

/* Material Button */
.wpee-btn,
.wpee-material-btn {
    background: #1976D2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-height: 36px;
}

.wpee-btn:hover,
.wpee-material-btn:hover {
    background: #1565C0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

.wpee-btn:active,
.wpee-material-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.wpee-btn:disabled,
.wpee-material-btn:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Button Variants */
.wpee-btn-secondary {
    background: #757575;
}

.wpee-btn-secondary:hover {
    background: #616161;
}

.wpee-btn-success {
    background: #4CAF50;
}

.wpee-btn-success:hover {
    background: #45a049;
}

.wpee-btn-danger {
    background: #f44336;
}

.wpee-btn-danger:hover {
    background: #da190b;
}

/* Loading State */
.wpee-btn-loading {
    position: relative;
    color: transparent !important;
}

.wpee-btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: wpee-spin 0.6s linear infinite;
}

@keyframes wpee-spin {
    to { transform: rotate(360deg); }
}

/* Alert/Message */
.wpee-alert {
    padding: 14px 16px;
    border-radius: 4px;
    margin-bottom: 1em;
    font-size: 14px;
    line-height: 1.5;
}

.wpee-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.wpee-alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.wpee-alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196F3;
}

.wpee-alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

/* Link */
.wpee-link {
    color: #1976D2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wpee-link:hover {
    color: #1565C0;
    text-decoration: underline;
}

/* Divider */
.wpee-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 1.5em 0;
    border: none;
}

/* Responsive */
@media (max-width: 600px) {
    .wpee-material-card {
        margin: 1em;
        padding: 1.5em;
        max-width: 100%;
    }
    
    .wpee-banner {
        margin: -1.5em -1.5em 1em -1.5em;
        height: 120px;
    }
    
    .wpee-title {
        font-size: 1.5em;
    }
}

/* Ripple Effect */
.wpee-ripple {
    position: relative;
    overflow: hidden;
}

.wpee-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wpee-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Student Login Specific */
.wpee-student-login {
    text-align: center;
}

/* Staff Login Specific */
.wpee-staff-login {
    text-align: center;
}

/* Exam Page Wrapper */
.wpee-exam-page {
    max-width: 900px;
}

.wpee-exam-page #wpee-exam-content {
    margin-top: 2em;
}

/* Loading Spinner */
.wpee-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: wpee-spin 0.6s linear infinite;
}

/* Text Helper */
.wpee-text-helper {
    font-size: 12px;
    color: #757575;
    margin-top: 4px;
}

.wpee-text-helper-error {
    color: #f44336;
}

