/* ---------------------------------------------------
 * Automated Website Audit Tool (Incremental) CSS
 * ---------------------------------------------------
 * This stylesheet provides styling for the Automated
 * Website Audit Tool plugin, including the audit form,
 * progress steps, loading spinner, and results display.
 * --------------------------------------------------- */

/* Container Styling */
.awat-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.awat-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Audit Form Styling */
#awat-audit-form {
    text-align: center;
    margin-bottom: 20px;
}

#awat-audit-form input[type="url"] {
    width: 70%;
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

#awat-audit-form button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    transition: background 0.3s ease;
}

#awat-audit-form button:hover {
    background: #005177;
}

/* Loading Indicator Styling */
#awat-loading {
    margin-top: 20px;
    text-align: center;
}

/* Progress Steps Styling */
.awat-progress {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.awat-step {
    position: relative;
    padding: 8px 16px;
    background: #e9e9e9;
    border-left: 4px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    color: #555;
    transition: background 0.3s ease, border-left-color 0.3s ease;
}

.awat-step.active {
    border-left-color: #0073aa;
    background-color: #f0f8ff;
}

.awat-step.active::before {
    content: '\f054'; /* Font Awesome Arrow */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #0073aa;
    margin-right: 8px;
}

.awat-step.completed {
    border-left-color: #28a745;
    background-color: #dff0d8;
}

.awat-step.completed::before {
    content: '\f00c'; /* Font Awesome Check */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #28a745;
    margin-right: 8px;
}

/* Spinner Styling */
.spinner {
    position: relative;
    margin: 10px auto;
    width: 50px;
    height: 50px;
}

.spinner::before, .spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner::after {
    border-color: #28a745 transparent transparent transparent;
    animation-delay: 0.5s;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Display Styling */
#awat-result {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	transition: opacity 0.3s ease;
    opacity: 0;
}

#awat-result.show {
    opacity: 1;
}
#awat-result h3 {
    margin-top: 0;
    color: #333;
}

#awat-result h4 {
    margin-bottom: 10px;
    color: #0073aa;
}

#awat-result p {
    margin: 10px 0;
    color: #555;
}

#awat-result p.error {
    color: red;
}

#awat-result ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #555;
}

#awat-result ul li {
    margin-bottom: 5px;
}

/* Design & UX Test Form Styling */
.awat-design-ux-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.awat-design-ux-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

#awat-design-ux-form {
    text-align: center;
    margin-bottom: 20px;
}

#awat-design-ux-form input[type="url"] {
    width: 70%;
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

#awat-design-ux-form button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    transition: background 0.3s ease;
}

#awat-design-ux-form button:hover {
    background: #005177;
}

#awat-design-ux-loading {
    margin-top: 20px;
    text-align: center;
}

/* Loading state for buttons */
#awat-audit-form button.loading,
#awat-design-ux-form button.loading {
    background: #aaa;
    cursor: not-allowed;
}

#awat-audit-form button.loading::after,
#awat-design-ux-form button.loading::after {
    content: '...';
    margin-left: 5px;
}


/* Responsive Design */
@media (max-width: 600px) {
    #awat-audit-form input[type="url"],
    #awat-design-ux-form input[type="url"] {
        width: 100%;
        margin: 0 0 10px 0;
    }
    
    #awat-audit-form button,
    #awat-design-ux-form button {
        width: 100%;
    }
    
    .awat-progress {
        flex-direction: column;
    }
}
