/**
 * ThinkScan Public CSS
 */

/* Dashboard container */
.thinkscan-dashboard {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.thinkscan-dashboard h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Dashboard header area */
.thinkscan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* Search area */
.thinkscan-search {
    position: relative;
    min-width: 250px;
}

.thinkscan-search input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    font-size: 14px;
    transition: all 0.2s ease;
}

.thinkscan-search input:focus {
    outline: none;
    border-color: #7fccde;
    box-shadow: 0 0 0 2px rgba(127, 204, 222, 0.2);
}

.thinkscan-search:before {
    content: "🔍";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a3a3a3;
}

/* Button styles */
.thinkscan-button {
    background: linear-gradient(135deg, #71d1c7 0%, #7fccde 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(127, 204, 222, 0.3);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.thinkscan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(127, 204, 222, 0.4);
    color: #fff;
    text-decoration: none;
}

.thinkscan-button:active {
    transform: translateY(0);
}

/* Table button styles */
.thinkscan-table .thinkscan-button {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 80px;
}

/* Table styles */
.thinkscan-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.thinkscan-table th,
.thinkscan-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.thinkscan-table th {
    background-color: #f5f8fa;
    color: #586069;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.thinkscan-table th:first-child {
    border-top-left-radius: 8px;
}

.thinkscan-table th:last-child {
    border-top-right-radius: 8px;
}

.thinkscan-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.thinkscan-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.thinkscan-table tr:hover {
    background-color: #f0f7fa;
}

/* Status indicators */
.thinkscan-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.thinkscan-status.complete {
    background-color: #dcf5e8;
    color: #28a745;
}

.thinkscan-status.pending {
    background-color: #fff8e1;
    color: #ffc107;
}

.thinkscan-status.failed {
    background-color: #feebed;
    color: #dc3545;
}

/* Audit form area */
.thinkscan-form-container {
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease;
    margin-top: 0;
}

.thinkscan-form-container.open {
    height: auto;
    margin-top: 25px;
    margin-bottom: 25px;
}

.thinkscan-audit-form {
    background-color: #f5f8fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e1e8ed;
}

.thinkscan-form-group {
    margin-bottom: 15px;
}

.thinkscan-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #586069;
}

.thinkscan-form-group input,
.thinkscan-form-group select,
.thinkscan-form-group textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
    font-size: 14px;
}

.thinkscan-form-group input:focus,
.thinkscan-form-group select:focus,
.thinkscan-form-group textarea:focus {
    outline: none;
    border-color: #7fccde;
    box-shadow: 0 0 0 2px rgba(127, 204, 222, 0.2);
}

.thinkscan-form-actions {
    text-align: right;
    margin-top: 20px;
}

/* Empty state */
.thinkscan-empty {
    text-align: center;
    padding: 40px 0;
    color: #586069;
}

.thinkscan-empty svg {
    opacity: 0.4;
    margin-bottom: 15px;
}

.thinkscan-empty p {
    margin: 0 0 15px;
    font-size: 16px;
}

/* Modal styles */
.thinkscan-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.thinkscan-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.thinkscan-modal-container {
    background-color: #fff;
    border-radius: 12px;
    max-width: 90%;
    width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.thinkscan-modal-overlay.show .thinkscan-modal-container {
    transform: translateY(0);
}

.thinkscan-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e8ed;
}

.thinkscan-modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.thinkscan-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #a3a3a3;
    cursor: pointer;
}

.thinkscan-modal-close:hover {
    color: #2c3e50;
}

.thinkscan-modal-body {
    padding: 20px;
    max-height: calc(90vh - 70px);
    overflow-y: auto;
}

/* Notification styles */
.thinkscan-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: #fff;
    font-weight: 500;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.thinkscan-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.thinkscan-notification.success {
    background-color: #28a745;
}

.thinkscan-notification.error {
    background-color: #dc3545;
}

/* Loader styles */
.thinkscan-loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(127, 204, 222, 0.3);
    border-radius: 50%;
    border-top-color: #7fccde;
    animation: thinkscan-spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.thinkscan-loading {
    text-align: center;
    padding: 40px 0;
}

/* Audit results styles */
.thinkscan-audit-results {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.thinkscan-results-header {
    margin-bottom: 25px;
}

.thinkscan-meta {
    background-color: #f5f8fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.thinkscan-meta p {
    margin: 8px 0;
}

.thinkscan-summary {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    background-color: #f5f8fa;
    border-radius: 8px;
    padding: 20px;
}

.thinkscan-score-container {
    margin-right: 30px;
    text-align: center;
}

.thinkscan-score {
    position: relative;
    width: 100px;
    height: 100px;
}

.score-label {
    margin-top: 10px;
    font-weight: 600;
    color: #586069;
}

.thinkscan-summary-text {
    flex: 1;
}

.thinkscan-summary-text h3 {
    margin-top: 0;
    color: #2c3e50;
}

/* Circular chart for score */
.circular-chart {
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 3.8;
    stroke-linecap: round;
    stroke: #71d1c7;
}

.percentage {
    fill: #2c3e50;
    font-size: 0.5em;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
}

/* Section and accordion styles */
.thinkscan-sections {
    margin-bottom: 30px;
}

.thinkscan-accordion {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
}

.thinkscan-accordion-item {
    border-bottom: 1px solid #e1e8ed;
}

.thinkscan-accordion-item:last-child {
    border-bottom: none;
}

.thinkscan-accordion-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f5f8fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.thinkscan-accordion-header:hover {
    background-color: #edf2f7;
}

.thinkscan-accordion-header h4 {
    margin: 0;
    flex: 1;
    color: #2c3e50;
}

.thinkscan-section-score {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.score-pill {
    background: linear-gradient(135deg, #71d1c7 0%, #7fccde 100%);
    color: #fff;
    border-radius: 12px;
    padding: 5px 12px;
    font-weight: 600;
    font-size: 14px;
}

.thinkscan-accordion-icon {
    font-size: 20px;
    color: #a3a3a3;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
}

.thinkscan-accordion-content {
    display: none;
    padding: 20px;
    background-color: #fff;
}

/* Check list styles */
.thinkscan-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thinkscan-check-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.thinkscan-check-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.thinkscan-check-icon {
    margin-right: 15px;
}

.thinkscan-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
}

.thinkscan-icon-check {
    background-color: #dcf5e8;
    color: #28a745;
}

.thinkscan-icon-warning {
    background-color: #fff8e1;
    color: #ffc107;
}

.thinkscan-icon-error {
    background-color: #feebed;
    color: #dc3545;
}

.thinkscan-check-content {
    flex: 1;
}

.thinkscan-check-content h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.thinkscan-recommendation {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e1e8ed;
}

/* Action list styles */
.thinkscan-actions {
    margin-bottom: 30px;
}

.thinkscan-action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thinkscan-action-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #71d1c7;
    background-color: #f5f8fa;
}

.thinkscan-action-item.high {
    border-left-color: #dc3545;
}

.thinkscan-action-item.medium {
    border-left-color: #ffc107;
}

.thinkscan-action-item.low {
    border-left-color: #28a745;
}

.thinkscan-action-task {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.thinkscan-action-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thinkscan-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.thinkscan-tag.impact-high {
    background-color: #feebed;
    color: #dc3545;
}

.thinkscan-tag.impact-medium {
    background-color: #fff8e1;
    color: #ffc107;
}

.thinkscan-tag.impact-low {
    background-color: #dcf5e8;
    color: #28a745;
}

.thinkscan-tag.difficulty-easy {
    background-color: #dcf5e8;
    color: #28a745;
}

.thinkscan-tag.difficulty-medium {
    background-color: #fff8e1;
    color: #ffc107;
}

.thinkscan-tag.difficulty-hard {
    background-color: #feebed;
    color: #dc3545;
}

/* Question list styles */
.thinkscan-questions {
    background-color: #f5f8fa;
    border-radius: 8px;
    padding: 20px;
}

.thinkscan-question-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thinkscan-question-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e8ed;
}

.thinkscan-question-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.thinkscan-question-icon {
    margin-right: 15px;
    font-size: 20px;
}

.thinkscan-processing {
    text-align: center;
    padding: 40px 0;
}

.thinkscan-error {
    background-color: #feebed;
    color: #dc3545;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .thinkscan-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .thinkscan-search {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .thinkscan-table {
        display: block;
        overflow-x: auto;
    }
    
    .thinkscan-summary {
        flex-direction: column;
    }
    
    .thinkscan-score-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .thinkscan-modal-container {
        width: 95%;
    }
}
