/* MyAiSchool Learning Tools - Mathematics Assessment Module Styles */
/* Enhanced for better student experience */

.myaischool-lt-math-assessment-module {
    border: 2px solid #1abc9c;
    padding: 25px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f8fffe 0%, #f0f9f7 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.myaischool-lt-math-assessment-module p em {
    color: #2c3e50;
    font-size: 0.95em;
    line-height: 1.6;
}

.myaischool-lt-math-assessment-module p em strong {
    font-style: normal;
    font-weight: 600;
    color: #16a085;
}

/* Setup Form - Enhanced */
.myaischool-lt-math-assessment-setup-form {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.myaischool-lt-math-assessment-setup-form > div {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.myaischool-lt-math-assessment-setup-form label {
    display: inline-block;
    min-width: 180px;
    margin-bottom: 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1em;
}

.myaischool-lt-math-assessment-setup-form select,
.myaischool-lt-math-assessment-setup-form input[type="number"] {
    padding: 10px 14px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    min-width: 220px;
    font-size: 1em;
    transition: all 0.3s ease;
    background-color: #fff;
}

.myaischool-lt-math-assessment-setup-form select:focus,
.myaischool-lt-math-assessment-setup-form input[type="number"]:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.myaischool-lt-math-assessment-setup-form input[type="number"] {
    width: 100px;
    min-width: 100px;
}

/* File Upload Section */
#myaischool-lt-math-assessment-upload-file-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#myaischool-lt-math-assessment-upload-file-button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

#myaischool-lt-math-assessment-upload-file-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

#myaischool-lt-math-assessment-file-name {
    color: #2c3e50;
    font-size: 0.9em;
    font-weight: 500;
}

#myaischool-lt-math-assessment-remove-file-button {
    padding: 6px 10px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#myaischool-lt-math-assessment-remove-file-button:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

#myaischool-lt-math-assessment-remove-file-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.myaischool-lt-math-assessment-setup-form .description {
    margin-top: 8px;
    color: #7f8c8d;
    font-size: 0.85em;
    line-height: 1.5;
}

/* Buttons - Enhanced */
#myaischool-lt-generate-assessment-button,
#myaischool-lt-submit-assessment-button {
    margin-top: 15px;
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#myaischool-lt-generate-assessment-button:hover,
#myaischool-lt-submit-assessment-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 188, 156, 0.4);
}

#myaischool-lt-generate-assessment-button:active,
#myaischool-lt-submit-assessment-button:active {
    transform: translateY(0);
}

#myaischool-lt-generate-assessment-button:disabled,
#myaischool-lt-submit-assessment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status Messages - Enhanced */
.myaischool-lt-math-assessment-status {
    margin-top: 20px;
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.myaischool-lt-math-assessment-status .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.myaischool-lt-math-assessment-status.myaischool-lt-error-message {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #ef9a9a;
    color: #c62828;
}

.myaischool-lt-math-assessment-status.myaischool-lt-error-message a {
    color: #ffffff !important;
    text-decoration: none;
}

/* Assessment Form */
.myaischool-lt-math-assessment-form {
    margin-top: 30px;
    border-top: 3px dashed #1abc9c;
    padding-top: 25px;
}

/* Progress Bar - Enhanced */
.myaischool-lt-math-assessment-progress-bar-container {
    width: 100%;
    background-color: #ecf0f1;
    border-radius: 10px;
    margin-bottom: 25px;
    height: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.myaischool-lt-math-assessment-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1abc9c 0%, #16a085 50%, #1abc9c 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.myaischool-lt-math-assessment-progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 28px;
    color: #2c3e50;
    font-size: 0.95em;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    z-index: 1;
}

/* Individual Question Styling - Enhanced */
.myaischool-lt-math-assessment-question {
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    padding: 22px;
    margin-bottom: 22px;
    border: 2px solid #e0f2f1;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.myaischool-lt-math-assessment-question:hover {
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.2);
    border-color: #1abc9c;
}

.myaischool-lt-math-assessment-q-text {
    margin-bottom: 15px;
    line-height: 1.7;
}

.myaischool-lt-math-assessment-q-text strong {
    font-size: 1.2em;
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.myaischool-lt-math-assessment-q-marks {
    font-size: 0.9em;
    color: #1abc9c;
    font-weight: 600;
    background-color: #e8f8f5;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-left: 10px;
}

/* Input Wrapper - Enhanced */
.myaischool-lt-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.myaischool-lt-math-assessment-question textarea.myaischool-lt-math-answer-input,
.myaischool-lt-math-assessment-question input[type="text"].myaischool-lt-math-answer-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
    line-height: 1.6;
    transition: all 0.3s ease;
    resize: vertical;
}

.myaischool-lt-math-assessment-question textarea.myaischool-lt-math-answer-input:focus,
.myaischool-lt-math-assessment-question input[type="text"].myaischool-lt-math-answer-input:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 4px rgba(26, 188, 156, 0.15);
}

.myaischool-lt-math-assessment-question textarea.myaischool-lt-math-answer-input {
    min-height: 100px;
}

/* Button container below input */
.myaischool-lt-input-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.myaischool-lt-input-wrapper .myaischool-lt-voice-input-button,
.myaischool-lt-input-wrapper .myaischool-lt-image-input-button {
    align-self: flex-start;
    margin-top: 0;
    margin-right: 0;
}

/* Button Icon and Text Styles */
.myaischool-lt-btn-icon {
    font-size: 1.2em;
    margin-right: 6px;
    display: inline-block;
}

.myaischool-lt-btn-text {
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

/* Voice Input Button - Enhanced */
.myaischool-lt-voice-input-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 1em;
    line-height: 1.4;
    height: fit-content;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.myaischool-lt-voice-input-button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.myaischool-lt-voice-input-button:active {
    transform: translateY(0);
}

.myaischool-lt-voice-input-button.myaischool-lt-voice-listening {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Image Upload Button - Enhanced */
.myaischool-lt-image-input-button {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 1em;
    line-height: 1.4;
    height: fit-content;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.myaischool-lt-image-input-button:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.myaischool-lt-image-input-button:active {
    transform: translateY(0);
}

.myaischool-lt-image-input-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.myaischool-lt-image-upload-input {
    display: none;
}

/* Results Display - Enhanced */
.myaischool-lt-math-assessment-results-display {
    margin-top: 30px;
    border-top: 3px dashed #1abc9c;
    padding-top: 25px;
}

.myaischool-lt-math-assessment-results-display h3 {
    margin-top: 0;
    color: #1abc9c;
    font-size: 1.8em;
    font-weight: 700;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #e8f8f5 0%, #d5f4f0 100%);
    border-radius: 10px;
    border: 2px solid #1abc9c;
}

.myaischool-lt-math-assessment-detailed-results {
    margin-top: 20px;
}

.myaischool-lt-math-assessment-result-item {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border-left-width: 6px;
    border-left-style: solid;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.myaischool-lt-math-assessment-result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.myaischool-lt-math-assessment-result-item.correct {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left-color: #4caf50;
}

.myaischool-lt-math-assessment-result-item.partial {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left-color: #ff9800;
}

.myaischool-lt-math-assessment-result-item.incorrect {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left-color: #f44336;
}

.myaischool-lt-math-assessment-result-item p {
    margin: 8px 0;
    line-height: 1.7;
}

.myaischool-lt-math-assessment-result-item p strong {
    color: #2c3e50;
    font-weight: 600;
}

.myaischool-lt-math-assessment-result-item p em {
    color: #555;
    font-style: italic;
}

.myaischool-lt-math-assessment-feedback {
    font-style: italic;
    color: #2c3e50;
    margin-top: 12px !important;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    border-left: 3px solid #1abc9c;
    line-height: 1.7;
}

.myaischool-lt-ideal-answer-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #bdc3c7;
}

.myaischool-lt-toggle-ideal-answer {
    display: inline-block;
    margin-bottom: 8px;
    color: #1abc9c;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    background-color: #e8f8f5;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.myaischool-lt-toggle-ideal-answer:hover {
    background-color: #d5f4f0;
    text-decoration: none;
    transform: translateY(-1px);
}

.myaischool-lt-math-assessment-ideal-answer {
    margin-top: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
    border: 2px solid #1abc9c;
    border-radius: 8px;
    font-size: 1em;
    color: #01579b;
    line-height: 1.8;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.15);
}

.myaischool-lt-math-assessment-ideal-answer strong {
    color: #004d40;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.myaischool-lt-math-assessment-results-display h4 {
    margin-top: 25px;
    color: #1abc9c;
    font-size: 1.4em;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #1abc9c;
}

.overall-suggestions-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #ffc107;
    margin-top: 15px;
    line-height: 1.8;
    font-size: 1.05em;
    color: #2c3e50;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.2);
}

.overall-suggestions-box h4 {
    margin-top: 0;
    color: #f57c00;
}

.overall-suggestions-box ul {
    margin: 10px 0;
    padding-left: 25px;
}

.overall-suggestions-box li {
    margin-bottom: 8px;
}

.overall-suggestions-box p {
    margin: 10px 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .myaischool-lt-math-assessment-module {
        padding: 15px;
    }

    .myaischool-lt-math-assessment-setup-form > div {
        flex-direction: column;
        align-items: stretch;
    }

    .myaischool-lt-math-assessment-setup-form label {
        min-width: auto;
        margin-bottom: 8px;
    }

    .myaischool-lt-math-assessment-setup-form select,
    .myaischool-lt-math-assessment-setup-form input[type="number"] {
        width: 100%;
        min-width: auto;
    }

    .myaischool-lt-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .myaischool-lt-input-buttons-row {
        flex-direction: column;
        gap: 8px;
    }

    .myaischool-lt-voice-input-button,
    .myaischool-lt-image-input-button {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-top: 0;
    }

    .myaischool-lt-btn-text {
        font-size: 0.85em;
    }

    .myaischool-lt-math-assessment-question {
        padding: 15px;
    }

    .myaischool-lt-math-assessment-q-text strong {
        font-size: 1.1em;
    }
}

/* Text-to-Speech Buttons */
.myaischool-lt-text-to-speech-btn,
.myaischool-lt-speak-ideal-answer,
.myaischool-lt-speak-suggestions,
.myaischool-lt-speak-feedback {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85em;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
    margin-left: 8px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.4;
}

.myaischool-lt-text-to-speech-btn:hover,
.myaischool-lt-speak-ideal-answer:hover,
.myaischool-lt-speak-suggestions:hover,
.myaischool-lt-speak-feedback:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 152, 0, 0.4);
}

.myaischool-lt-text-to-speech-btn.myaischool-lt-speaking,
.myaischool-lt-speak-ideal-answer.myaischool-lt-speaking,
.myaischool-lt-speak-suggestions.myaischool-lt-speaking,
.myaischool-lt-speak-feedback.myaischool-lt-speaking {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    animation: pulse-speak 1.5s infinite;
}

@keyframes pulse-speak {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.myaischool-lt-math-assessment-q-text .myaischool-lt-text-to-speech-btn {
    font-size: 0.8em;
    padding: 4px 10px;
}

.myaischool-lt-math-assessment-q-text .myaischool-lt-text-to-speech-btn .myaischool-lt-btn-icon {
    font-size: 1em;
    margin-right: 4px;
}

.myaischool-lt-math-assessment-q-text .myaischool-lt-text-to-speech-btn .myaischool-lt-btn-text {
    font-size: 0.85em;
}

.myaischool-lt-math-assessment-results-display h4 .myaischool-lt-speak-suggestions {
    font-size: 0.8em;
    padding: 3px 6px;
    margin-left: 10px;
}

.myaischool-lt-math-assessment-ideal-answer .myaischool-lt-speak-ideal-answer {
    font-size: 0.8em;
    padding: 3px 6px;
    margin-left: 8px;
    float: right;
}

/* Print Styles */
@media print {
    .myaischool-lt-math-assessment-module {
        border: 1px solid #000;
        box-shadow: none;
    }

    .myaischool-lt-voice-input-button,
    .myaischool-lt-image-input-button,
    .myaischool-lt-text-to-speech-btn,
    .myaischool-lt-speak-ideal-answer,
    .myaischool-lt-speak-suggestions,
    .myaischool-lt-speak-feedback,
    #myaischool-lt-generate-assessment-button,
    #myaischool-lt-submit-assessment-button {
        display: none;
    }
}

/* Login and Recharge Button Styles */
.myaischool-lt-login-button,
.myaischool-lt-recharge-button {
    display: inline-block !important;
    margin-left: 10px;
    padding: 8px 16px;
    background: #1abc9c !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.myaischool-lt-login-button:hover,
.myaischool-lt-recharge-button:hover {
    background: #16a085 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
    text-decoration: none;
    color: #ffffff !important;
}

/* Login and Recharge Button Styles */
.myaischool-lt-login-button,
.myaischool-lt-recharge-button {
    display: inline-block !important;
    margin-left: 10px;
    padding: 8px 16px;
    background: #1abc9c !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.myaischool-lt-login-button:hover,
.myaischool-lt-recharge-button:hover {
    background: #16a085 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
    text-decoration: none;
    color: #ffffff !important;
}
