/* PMEDIA Quiz Machine - Frontend Styles */

.pmq-quiz-wrapper {
    max-width: 800px;
    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, Arial, sans-serif;
}


.quiz-title {
   text-align:center;
   margin-top:110px;
   font-size:70px;
}

/* Quiz Header */
.pmq-quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.pmq-quiz-title {
    font-size: 2.4em;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.pmq-quiz-description {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
}

.pmq-question-image-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.pmq-question-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.pmq-next-button {
   font-size:18px !important; 
   border-radius:20px !important;
   padding: 12px 24px !important;
   background: #EF7C28 !important;
}

.pmq-nav-button {
   font-size:18px !important; 
   border-radius:20px !important;
   padding: 12px 24px !important;
   background: #EF7C28 !important;
}

.pmq-submit-button {
   font-size:20px !important; 
   border-radius:20px !important;
   padding: 12px 36px !important;
   background: #EF7C28 !important;
}

.pmq-share-button {
  font-size:18px !important; 
   border-radius:20px !important;
   padding: 12px 22px !important; 
}

.pmq-twitter {
  font-size:18px !important; 
  border-radius:20px !important;
  padding: 12px 22px !important; 
}

@media (max-width: 768px) {
    .pmq-question-image {
        max-width: 100%;
    }
}

/* Progress Bar */
.pmq-progress-wrapper {
    margin-bottom: 30px;
}

.pmq-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.pmq-progress-fill {
    height: 100%;
    background: #FAB42B;
    border-radius: 4px;
    transition: width 0.3s ease;
}

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

/* Questions */
.pmq-questions {
    margin-bottom: 30px;
}

.pmq-question {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.pmq-question:hover {
    background: #f5f5f5;
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.1);
}

.pmq-question fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.pmq-question-label {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: block;
    line-height: 1.4;
}

.pmq-question-number {
    color: #111;
    margin-right: 8px;
}

.pmq-question-help {
    display: block;
    font-size: 0.9em;
    color: #777;
    font-weight: normal;
    margin-top: 8px;
    font-style: italic;
}

/* Question Options */
.pmq-question-options {
    margin-top: 20px;
}

.pmq-option {
    display: block;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pmq-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
    transform: translateX(5px);
}

.pmq-option:has(input:checked) {
    border-color: #007cba;
    background: #e7f3ff;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.2);
}

.pmq-option input[type="radio"],
.pmq-option input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.pmq-option span {
    font-size: 1em;
    color: #333;
    line-height: 1.5;
}

/* User Identification */
.pmq-user-identification {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.pmq-user-identification label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.pmq-user-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.pmq-user-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Consent */
.pmq-consent {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.pmq-consent label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.pmq-consent input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    transform: scale(1.1);
}

/* Submit Button */
.pmq-submit-wrapper {
    text-align: center;
    margin-top: 30px;
}

.pmq-submit-button {
    background: linear-gradient(135deg, #007cba, #005a8b);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.pmq-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
    background: linear-gradient(135deg, #005a8b, #004670);
}

.pmq-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 124, 186, 0.2);
}

.pmq-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.pmq-quiz-results {
    text-align: center;
    animation: pmq-fadeIn 0.5s ease-in;
}

.pmq-results-header {
    margin-bottom: 30px;
}

.pmq-results-header h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
}

.pmq-score-display {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.pmq-score-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.pmq-score-percentage {
  font-size: 1.9em;
  opacity: 1;
  margin-top: 20px;
}

.pmq-results-heading {
  color: #333;
    font-size: 2em;
    margin-bottom: 20px;  
}

.pmq-results-content p {
    color: #222 !important; /* Dark gray instead of white */
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.pmq-results-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
}

.pmq-share-preview-text {
    color: #222 !important;
    background: #f5f5f5; 
    border-radius: 4px; 
    font-size: 14px;
}

.pmq-optin-fields {
    padding-left:0 !important;
}

/* Sharing Section */
.pmq-sharing-section {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.pmq-sharing-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.pmq-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pmq-share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
}

.pmq-web-share {
    background: #6c757d;
    color: white;
}

.pmq-web-share:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.pmq-facebook {
    background: #1877f2;
    color: white;
}

.pmq-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

.pmq-twitter {
    background: #000000;
    color: white;
}

.pmq-twitter:hover {
    background: #333333;
    transform: translateY(-2px);
}

.pmq-copy-share {
    background: #6f42c1;
    color: white;
}

.pmq-copy-share:hover {
    background: #5a32a3;
    transform: translateY(-2px);
}

.pmq-icon {
    font-weight: bold;
    font-size: 16px;
}

/* Quiz Actions */
.pmq-quiz-actions {
    margin-top: 20px;
}

/* Vote Results Styles */
.pmq-vote-results .pmq-results-header h2 {
    color: #28a745;
    font-size: 2.2em;
}

.pmq-vote-user-name {
    font-size: 1.3em;
    color: #666;
    margin-top: 10px;
}

.pmq-vote-results .pmq-results-content {
    background: #f8f9fa;
    text-align: center;
    padding: 30px;
}

.pmq-vote-results .pmq-results-content p {
    font-size: 1.2em;
    color: #333;
    margin: 10px 0;
}

.pmq-retake-button {
  background: transparent;
  border: 2px solid #739838;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  color: #739838 !important;
  font-size: 18px;
}

.pmq-retake-button:hover {
    background: #739838;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

/* Copy Message */
.pmq-copy-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 15px;
    animation: pmq-slideDown 0.3s ease;
}

/* Accessibility */
.pmq-quiz-wrapper:focus-within {
    outline: 3px solid rgba(0, 124, 186, 0.3);
    outline-offset: 2px;
}

.pmq-option:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pmq-quiz-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .pmq-quiz-title {
        font-size: 1.5em;
    }
    
    .pmq-question {
        padding: 20px;
    }
    
    .pmq-question-label {
        font-size: 1.1em;
    }
    
    .pmq-option {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
    
    .pmq-share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .pmq-share-button {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .pmq-score-display {
        padding: 20px;
    }
    
    .pmq-score-number {
        font-size: 2em;
    }
    
    .pmq-results-header h2 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .pmq-quiz-wrapper {
        margin: 5px;
        padding: 10px;
    }
    
    .pmq-quiz-title {
        font-size: 1.3em;
    }
    
    .pmq-question {
        padding: 15px;
    }
    
    .pmq-submit-button {
        padding: 12px 30px;
        font-size: 1em;
    }
}

/* Animations */
@keyframes pmq-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pmq-slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 100px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pmq-quiz-wrapper {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .pmq-quiz-title {
        color: #f7fafc;
    }
    
    .pmq-quiz-description {
        color: #cbd5e0;
    }
    
    .pmq-question {
        background: #4a5568;
        border-color: #718096;
    }
    
    .pmq-question:hover {
        background: #553c9a;
        border-color: #667eea;
    }
    
    .pmq-option {
        background: #2d3748;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .pmq-option:hover {
        background: #4a5568;
        border-color: #667eea;
    }
    
    .pmq-user-identification {
        background: #4a5568;
        border-color: #718096;
    }
    
    .pmq-user-input {
        background: #2d3748;
        border-color: #718096;
        color: #e2e8f0;
    }
}