/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Main Container */
.mpq-container {
    max-width: 800px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

/* Progress Bar */
.mpq-progress-container {
    padding-top: 40px;
    border-top: 1px solid;
    border-color: #cecece;
    margin-bottom: -45px;
    margin-top: 40px;
    margin-left: 30px;
    margin-right: 30px;
}

.mpq-progress-bar {
    height: 8px;
    background-color: #eaeaea;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.mpq-progress-fill {
    height: 100%;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.mpq-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mpq-progress-step {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #777;
    transition: all 0.3s ease;
}
@media (max-width: 544px) {
.mpq-progress-step {
display: none;
}
}
.mpq-progress-step.active {
    background: #3498db;
    color: white;
}

.mpq-progress-step.completed {
    background: #2ecc71;
    color: white;
}

.mpq-progress-label {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Header */
.mpq-header {
    margin-bottom: 2rem;
    text-align: center;
}

.mpq-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.mpq-description {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 1.5rem;
}

/* Questions */
.mpq-questions {
    margin-bottom: 2rem;
}

.mpq-question-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 6px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.mpq-question-item.mpq-unanswered {
    border-color: #e74c3c;
    background-color: #fef5f5;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.mpq-question-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.mpq-question-number {
    font-weight: 700;
    margin-right: 0.5rem;
    color: #3498db;
}

/* Scale */
.mpq-question-scale {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
}

.mpq-scale-option {
    text-align: center;
    flex: 1;
}

.mpq-scale-option input[type="radio"] {
    opacity: 0;
    position: absolute;
}

.mpq-scale-option label {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 8px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ddd;
    cursor: pointer;
    margin: 0 auto;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mpq-scale-option input[type="radio"]:checked + label {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.mpq-scale-option input[type="radio"]:focus + label {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.mpq-scale-option label:hover {
    border-color: #3498db;
    background: #ebf5fb;
}

.mpq-scale-labels {
    display: flex;
    justify-content: space-between;
    margin: 0px 2% 0px 2%;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* Email Field */
.mpq-email-field {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f5f9fd;
    border-radius: 6px;
    border: 1px solid #d4e6f1;
}

.mpq-email-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2980b9;
}

.mpq-email-field input[type="email"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #d4e6f1;
    border-radius: 4px;
    font-size: 1rem;
}

.mpq-field-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Form Actions */
.mpq-form-actions {
    margin-top: 2rem;
    text-align: center;
}

.mpq-submit-button {
    padding: 0.8rem 2rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 600;
}

.mpq-submit-button:hover {
    background: #2980b9;
}

.mpq-submit-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Loading */
.mpq-loading {
    display: none;
    margin-top: 1rem;
    text-align: center;
}

.mpq-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: mpq-spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes mpq-spin {
    to { transform: rotate(360deg); }
}

.mpq-loading-text {
    vertical-align: middle;
}

/* Form Messages */
.mpq-form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
}

.mpq-message-error {
    background-color: #fef5f5;
    color: #e74c3c;
    border: 1px solid #f9d6d5;
}

.mpq-message-success {
    background-color: #f0f9eb;
    color: #27ae60;
    border: 1px solid #daf0d6;
}

/* Results Page */
.mpq-results-container {
    max-width: 900px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.mpq-results-header {
    margin-bottom: 2rem;
    text-align: center;
}

.mpq-results-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.mpq-results-description {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 1.5rem;
}

.mpq-user-info {
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin: 1rem 0 1.5rem;
}

.mpq-user-name,
.mpq-results-date {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #555;
}

.mpq-user-name strong,
.mpq-results-date strong {
    color: #333;
}

.mpq-chart-container {
    margin: 2rem 0;
    height: 400px;
}

/* High Score Patterns Section */
.mpq-high-score-patterns {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.mpq-section-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 0 0 1.2rem 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.8rem;
}

.mpq-high-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.mpq-high-score-card {
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mpq-high-score-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.mpq-high-score-content {
    padding: 1.2rem;
}

.mpq-warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 600;
}

.mpq-pattern-video {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.mpq-pattern-video h4 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

/* Results Grid */
.mpq-patterns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.mpq-pattern-card {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mpq-pattern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mpq-pattern-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.mpq-pattern-name {
    font-size: 1.8rem;
    font-weight: 600;
    padding-right: 10px;
}

.mpq-pattern-score {
    font-size: 1.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mpq-pattern-description {
    padding: 1rem;
    background: white;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Pattern Videos */
.mpq-pattern-video {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #eaeaea;
}

.mpq-pattern-video h4 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: 600;
}

.mpq-pattern-video iframe {
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Stages */
.mpq-stages {
    position: relative;
}

.mpq-stage {
    display: none;
    margin-bottom: 2rem;
}

.mpq-stage.active {
    display: block;
}

.mpq-stage-heading {
    margin-bottom: 1.5rem;
}

.mpq-stage-heading h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.mpq-stage-heading p {
    color: #666;
    font-size: 1rem;
}

.mpq-stage-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}
.mpq-stage-navigation-1 {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    flex-direction: row-reverse;
}
#ast-scroll-top {
right: 30px;
}
.mpq-prev-stage,
.mpq-next-stage,
.mpq-show-user-info {
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mpq-prev-stage {
    background: #f7f7f7;
    color: #555;
    border: 1px solid #ddd;
}

.mpq-prev-stage:hover {
    background: #eee;
}

.mpq-next-stage,
.mpq-show-user-info {
    background: #3498db;
    color: white;
    border: none;
}

.mpq-next-stage:hover,
.mpq-show-user-info:hover {
    background: #2980b9;
}

/* User Info Stage */
.mpq-user-info-stage {
    display: none;
    margin-bottom: 2rem;
}

.mpq-user-info-fields {
    margin-bottom: 2rem;
}

.mpq-form-field {
    margin-bottom: 1.5rem;
}

.mpq-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.mpq-form-field input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.mpq-form-field input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

/* Results Actions */
.mpq-results-actions {
    margin-top: 2rem;
    text-align: center;
}

.mpq-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
    margin: 0 0.5rem;
    min-width: 180px !important;
}

.mpq-button-primary {
    background: #3498db;
    color: white;
    border: none;
    margin-top: 15px;
}

.mpq-button-primary:hover {
    background: #2980b9;
}

.mpq-button-secondary {
    background: white;
    color: #3498db;
    border: 2px solid #3498db;
}

.mpq-button-secondary:hover {
    background: #f7fbfe;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .mpq-container,
    .mpq-results-container {
        padding: 0.8rem;
       /* margin: 1rem; */ 
    }
    
    .mpq-patterns-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 576px) {
    .mpq-question-scale {
        flex-wrap: wrap;
    }
    
    .mpq-scale-option {
        margin-bottom: 0.5rem;
    }
    
    .mpq-question-item {
        padding: 1rem;
    }
}
label.mpq-active-label {
    background-color: #3498db !important;
    color: #fff !important;
    border-color: #3498db !important;
}

/* This targets labels for checked radio buttons, even with BR in between */
input[type="radio"]:checked ~ label[for] {
    background-color: #3498db !important; 
    color: #fff !important;
    border-color: #3498db !important;
}

/* Make sure transition is smooth */
.mpq-scale-option label {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
@media (max-width: 767px) {
  .mpq-high-score-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}
.mpq-high-score-header h3.mpq-pattern-name,
.mpq-high-score-header .mpq-pattern-score {
  color: #ffffff !important; /* White text */
}

/* Also apply to regular pattern cards if needed */
.mpq-pattern-header h3.mpq-pattern-name,
.mpq-pattern-header .mpq-pattern-score {
  color: #ffffff !important;
  font-size: 25px !important;
}
.chartjs-tooltip {
  direction: rtl !important;
  text-align: right !important;
}

#mpq-results-chart {
  direction: rtl;
}