/**
 * IEP SMART Assessment Plugin - Styles
 * 
 * @package IEPLoePlugin
 * @version 9.9.8
 */

/* Form Container */
.iep-loe-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Elements */
.iep-loe-form label {
    display: block;
    margin: 15px 0 5px;
    font-weight: 600;
    color: #333;
}

.iep-loe-form input[type="text"],
.iep-loe-form input[type="date"],
.iep-loe-form select,
.iep-loe-form textarea {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.iep-loe-form textarea {
    min-height: 120px;
    resize: vertical;
}

.iep-loe-form select {
    height: 40px;
}

/* Buttons */
.iep-loe-form button,
.iep-loe-result button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.iep-loe-form button:hover,
.iep-loe-result button:hover {
    background: #005177;
}

.iep-loe-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading State */
.iep-loe-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.iep-loe-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: iep-loe-spin 1s linear infinite;
}

@keyframes iep-loe-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.iep-loe-result {
    margin: 20px 0;
}

.iep-loe-error,
.iep-loe-success {
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.iep-loe-error {
    background-color: #fdf7f7;
    border-left-color: #dc3232;
    color: #444;
}

.iep-loe-success {
    background-color: #f0f8f0;
    border-left-color: #46b450;
    color: #444;
}

/* Form Validation */
.iep-loe-form input:invalid,
.iep-loe-form textarea:invalid,
.iep-loe-form select:invalid {
    border-color: #dc3232;
}

.iep-loe-form input:invalid:focus,
.iep-loe-form textarea:invalid:focus,
.iep-loe-form select:invalid:focus {
    box-shadow: 0 0 2px rgba(220, 50, 50, 0.5);
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .iep-loe-form {
        padding: 15px;
    }

    .iep-loe-form input[type="text"],
    .iep-loe-form input[type="date"],
    .iep-loe-form select {
        height: 40px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .iep-loe-form button {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Admin Area Styles */
.wp-admin .iep-loe-diagnostic {
    margin-top: 30px;
}

.wp-admin .iep-loe-diagnostic table {
    border-spacing: 0;
    width: 100%;
    clear: both;
    margin: 0;
}

.wp-admin .iep-loe-diagnostic td {
    padding: 8px 10px;
    vertical-align: top;
}

.wp-admin .iep-loe-diagnostic tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Accessibility */
.iep-loe-form button:focus,
.iep-loe-result button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.iep-loe-form input:focus,
.iep-loe-form textarea:focus,
.iep-loe-form select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 2px rgba(0, 115, 170, 0.8);
    outline: none;
}

/* Print Styles */
@media print {
    .iep-loe-form button,
    .iep-loe-form input[type="submit"] {
        display: none;
    }

    .iep-loe-form,
    .iep-loe-result {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .iep-loe-form input,
    .iep-loe-form textarea,
    .iep-loe-form select {
        border: 1px solid #ddd;
    }
}

/* RTL Support */
.rtl .iep-loe-error,
.rtl .iep-loe-success {
    border-left: none;
    border-right: 4px solid;
}

.rtl .iep-loe-error {
    border-right-color: #dc3232;
}

.rtl .iep-loe-success {
    border-right-color: #46b450;
}

.card {
	max-width: 800px;
	margin-top: 20px;
	padding: 20px;
}
.form-table td p.description {
	margin-top: 5px;
}
#test-results {
	padding: 10px;
	margin-top: 10px;
}
#test-results.success {
	border-left-color: #46b450;
}
#test-results.error {
	border-left-color: #dc3232;
}

/* Add at the end of your existing style.css file */
.smart-evaluation {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.smart-evaluation h4 {
    color: #2c3338;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.smart-criteria .criterion {
    margin-bottom: 12px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 4px solid #646970;
}

.smart-criteria .specific { border-left-color: #2271b1; }
.smart-criteria .measurable { border-left-color: #00a32a; }
.smart-criteria .attainable { border-left-color: #dba617; }
.smart-criteria .relevant { border-left-color: #8c5e58; }
.smart-criteria .time-bound { border-left-color: #646970; }

.smart-code {
    margin: 15px 0;
    padding: 10px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 4px;
}

.suggestions {
    margin: 15px 0;
    padding: 10px;
    background: #f6f7f7;
    border: 1px dashed #dcdcde;
    border-radius: 4px;
}

.metadata, .usage-metrics {
    font-size: 0.9em;
    color: #646970;
    margin-bottom: 20px;
}

.metadata p, .usage-metrics p {
    margin: 5px 0;
}

/* Loading state */
.iep-loe-loading {
    opacity: 0.7;
    pointer-events: none;
}

.iep-loe-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: iep-loe-spin 1s linear infinite;
}

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