/* Quiz Tasks Frontend Styles */

.qlz-quiz-task {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333333;
}

.qlz-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.2;
}

.qlz-image-container {
    text-align: center;
    margin: 20px 0;
}

.qlz-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qlz-ad-above-heading,
.qlz-ad-under-heading,
.qlz-ad-after-form {
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.qlz-form {
    margin: 30px 0;
}

.qlz-field {
    margin-bottom: 25px;
}

.qlz-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333333;
    font-size: 1rem;
}

.qlz-required {
    color: #dc3545;
    margin-left: 3px;
}

.qlz-input,
.qlz-textarea,
.qlz-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.qlz-input:focus,
.qlz-textarea:focus,
.qlz-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.qlz-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.qlz-button {
    background: #007bff;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
    font-family: inherit;
}

.qlz-button:hover {
    background: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qlz-button:active {
    transform: translateY(0);
}

.qlz-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qlz-button-left {
    margin-right: auto;
}

.qlz-button-center {
    margin: 0 auto;
}

.qlz-button-right {
    margin-left: auto;
}

.qlz-result {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.qlz-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qlz-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.qlz-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Popup styles */
.qlz-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.qlz-popup-content {
    background: transparent;
    text-align: center;
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.qlz-popup-timer {
    position: absolute;
    top: -30px;
    width: 100%;
    text-align: center;
    color: #666666;
    font-size: 12px;
    font-weight: 500;
}

.qlz-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: none;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    transition: background-color 0.2s ease;
}

.qlz-popup-close:hover {
    background: #c82333;
}

.qlz-popup-close.visible {
    display: block;
}

.qlz-popup-ad {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive design */
@media (max-width: 768px) {
    .qlz-quiz-task {
        padding: 15px;
        margin: 10px;
    }
    
    .qlz-heading {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .qlz-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .qlz-button {
        width: 100%;
        margin: 0 !important;
    }
    
    .qlz-message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .qlz-popup-content {
        max-width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .qlz-quiz-task {
        padding: 10px;
        margin: 5px;
    }
    
    .qlz-heading {
        font-size: 1.75rem;
    }
    
    .qlz-input,
    .qlz-textarea,
    .qlz-select {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .qlz-button {
        padding: 12px 20px;
        font-size: 16px;
    }
}