/**
 * Windrush API Plugin Styles
 */

.windrush-api-container {
    /* max-width: 1200px; */
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.windrush-api-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* API Endpoint Information Box (Light Blue) */
.windrush-api-info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.windrush-api-info-row {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.windrush-api-info-row:last-child {
    margin-bottom: 0;
}

.windrush-api-info-row strong {
    min-width: 120px;
    color: #1976d2;
    font-weight: 600;
}

.windrush-api-info-row span {
    color: #1565c0;
    word-break: break-all;
}

.windrush-api-path-link {
    color: #1976d2 !important;
    cursor: pointer;
    text-decoration: underline;
}

.windrush-api-path-link:hover {
    color: #0d47a1 !important;
}

/* API Selection and Configuration */
.windrush-api-controls {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.windrush-api-control-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.windrush-api-control-group:last-of-type {
    margin-bottom: 0;
}

.windrush-api-control-group label {
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.windrush-api-select,
.windrush-api-lang {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    min-width: 200px;
    flex: 0 0 auto;
}

.windrush-api-base-path,
.windrush-api-folder {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    flex: 1;
    min-width: 300px;
}

.windrush-api-folder {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 200px;
}

.windrush-api-hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-left: 10px;
}

.windrush-api-button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.windrush-api-button {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.windrush-api-button:hover {
    background: #45a049;
}

.windrush-api-button:active {
    transform: scale(0.98);
}

.windrush-api-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.windrush-api-button-primary {
    background: #4CAF50;
}

.windrush-api-button-primary:hover {
    background: #45a049;
}

.windrush-api-button-secondary {
    background: #757575;
}

.windrush-api-button-secondary:hover {
    background: #616161;
}

/* Status Messages */
.windrush-api-status {
    margin: 20px 0;
    min-height: 30px;
}

.windrush-api-status-success {
    padding: 12px 15px;
    background: #4CAF50;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    margin-bottom: 20px;
}

.windrush-api-status-error {
    padding: 12px 15px;
    background: #f44336;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    margin-bottom: 20px;
}

.windrush-api-status-loading {
    padding: 12px 15px;
    background: #2196F3;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Response Display */
.windrush-api-response {
    margin-top: 20px;
}

.windrush-api-response label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.windrush-api-json {
    width: 100%;
    min-height: 400px;
    background: #263238 !important;
    color: #aed581;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #1e2729;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    overflow-y: auto;
    white-space: pre;
    word-wrap: normal;
    overflow-x: auto;
}

.windrush-api-json::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.windrush-api-json::-webkit-scrollbar-track {
    background: #1e2729;
    border-radius: 4px;
}

.windrush-api-json::-webkit-scrollbar-thumb {
    background: #546e7a;
    border-radius: 4px;
}

.windrush-api-json::-webkit-scrollbar-thumb:hover {
    background: #607d8b;
}

/* Collapsible JSON Viewer */
.windrush-api-json-viewer {
    width: 98%;
    min-height: 400px;
    max-height: 800px;
    background: #263238;
    color: #aed581;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #1e2729;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    overflow-x: auto;
}

.windrush-api-json-viewer::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.windrush-api-json-viewer::-webkit-scrollbar-track {
    background: #1e2729;
    border-radius: 4px;
}

.windrush-api-json-viewer::-webkit-scrollbar-thumb {
    background: #546e7a;
    border-radius: 4px;
}

.windrush-api-json-viewer::-webkit-scrollbar-thumb:hover {
    background: #607d8b;
}

.windrush-json-node {
    margin-left: 0;
}

.windrush-json-header {
    cursor: pointer;
    padding: 2px 0;
    user-select: none;
    display: flex;
    align-items: center;
}

.windrush-json-header:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.windrush-json-toggle {
    display: inline-block;
    width: 16px;
    color: #81c784;
    font-size: 10px;
    margin-right: 4px;
    cursor: pointer;
    text-align: center;
    flex-shrink: 0;
}

.windrush-json-key {
    color: #9ccc65;
    font-weight: 500;
    margin-right: 4px;
}

.windrush-json-type {
    color: #64b5f6;
    margin: 0 8px;
    font-style: italic;
}

.windrush-json-count {
    color: #90a4ae;
    font-size: 11px;
    font-style: italic;
    margin-left: 4px;
}

.windrush-json-value {
    color: #aed581;
}

.windrush-json-value.windrush-json-string {
    color: #ce93d8;
}

.windrush-json-value.windrush-json-number {
    color: #ffb74d;
}

.windrush-json-value.windrush-json-boolean {
    color: #4fc3f7;
}

.windrush-json-null {
    color: #ef5350;
    font-style: italic;
}

.windrush-json-children {
    margin-left: 20px;
    border-left: 1px solid rgba(174, 213, 129, 0.2);
    padding-left: 10px;
    margin-top: 2px;
}

.windrush-json-error {
    color: #ef5350;
    background: rgba(239, 83, 80, 0.1);
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Import Interface Styles */
.windrush-api-import-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.windrush-api-import-info {
    background: #f0f8ff;
    border-left: 4px solid #2196F3;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.windrush-api-import-info p {
    margin: 10px 0;
}

.windrush-api-import-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.windrush-api-import-controls {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.windrush-api-button-import {
    background: #2196F3;
    font-size: 16px;
    padding: 12px 24px;
}

.windrush-api-button-import:hover {
    background: #1976D2;
}

.windrush-api-import-progress-container {
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.windrush-api-import-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
}

.windrush-api-import-percentage {
    font-size: 18px;
    color: #2196F3;
    font-weight: 700;
}

.windrush-api-import-details {
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.windrush-api-import-details:empty {
    display: none;
}

.windrush-api-import-results {
    margin-top: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.windrush-api-import-results h3 {
    margin-top: 0;
    color: #333;
}

.windrush-import-results-summary {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}

.windrush-import-results-summary h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #2196F3;
    font-size: 16px;
}

.windrush-import-results-summary h4:first-child {
    margin-top: 0;
}

.windrush-import-results-summary ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: disc;
}

.windrush-import-results-summary li {
    margin: 5px 0;
}

/* WordPress Admin Styles */
.wrap .windrush-api-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.wrap .windrush-api-container h1 {
    margin-bottom: 10px;
}

/* Progress Bar Container (if needed) */
.windrush-api-progress-container {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    display: none;
}

.windrush-api-progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.windrush-api-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 50%, #4CAF50 100%);
    background-size: 200% 100%;
    border-radius: 15px;
    transition: width 0.3s ease;
    animation: progress-shimmer 2s infinite;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

@keyframes progress-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.windrush-api-progress-text {
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .windrush-api-container {
        padding: 15px;
        margin: 10px;
    }
    
    .windrush-api-control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .windrush-api-control-group label {
        display: block;
        margin-bottom: 5px;
        min-width: auto;
    }
    
    .windrush-api-select,
    .windrush-api-lang,
    .windrush-api-base-path,
    .windrush-api-folder {
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
    
    .windrush-api-button-group {
        flex-direction: column;
    }
    
    .windrush-api-button {
        width: 100%;
    }
    
    .windrush-api-info-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .windrush-api-info-row strong {
        min-width: auto;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.windrush-api-status-loading::after {
    content: '...';
    animation: pulse 1.5s infinite;
}

/* Image Mapping Styles */
.windrush-api-image-mapping-results {
    margin-top: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.windrush-api-image-mapping-results h3 {
    margin-top: 0;
    color: #333;
}

.windrush-image-mapping-list {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}

.status-completed {
    color: #4CAF50;
    font-weight: 600;
}

.status-pending {
    color: #ff9800;
    font-weight: 600;
}

.status-failed {
    color: #f44336;
    font-weight: 600;
}

.mapping-details {
    margin-top: 10px;
}

.mapping-details h4 {
    margin-top: 0;
    color: #2196F3;
}

.mapping-details h5 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}