/**
 * Frontend Styles for XML Sitemap URL Extractor
 */

.xsue-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.xsue-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 60px 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.2);
}

.xsue-header-content h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
    color: white;
}

.xsue-header-content p {
    margin: 0;
    font-size: 1.2em;
    opacity: 0.95;
}

/* Cards */
.xsue-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.xsue-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    color: #1f2937;
}

.xsue-card h3 {
    font-size: 1.3em;
    color: #374151;
    margin: 20px 0 10px 0;
}

.xsue-card p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* Form */
.xsue-form {
    margin-top: 20px;
}

.xsue-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.xsue-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.xsue-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.xsue-btn {
    padding: 16px 32px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.xsue-btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.xsue-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.xsue-btn-secondary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.xsue-btn-secondary:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.xsue-btn-outline {
    background: transparent;
    color: #1f2937;
    border-color: #e5e7eb;
}

.xsue-btn-outline:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.xsue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.xsue-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.xsue-help-text {
    margin-top: 15px;
    padding: 12px 16px;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    font-size: 14px;
    color: #1e40af;
}

/* Progress */
.xsue-progress-section {
    text-align: center;
}

.xsue-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 15px;
}

.xsue-progress-fill {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.xsue-progress-text {
    color: #6b7280;
    font-weight: 500;
}

/* Child Sitemaps */
.xsue-child-sitemaps-section {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.xsue-child-header h2 {
    margin-bottom: 10px;
}

.xsue-child-header p {
    margin-bottom: 20px;
}

.xsue-child-list {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.xsue-child-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.xsue-child-item:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.xsue-child-icon {
    font-size: 2em;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.xsue-child-info {
    flex: 1;
    min-width: 0;
}

.xsue-child-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #1f2937;
}

.xsue-child-url {
    margin: 0;
    font-size: 0.85em;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Courier New', monospace;
}

.xsue-child-extract-btn {
    flex-shrink: 0;
}

.xsue-child-actions {
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    text-align: center;
}

.xsue-child-actions .xsue-btn {
    min-width: 200px;
}

/* Results */
.xsue-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.xsue-results-stats {
    display: flex;
    gap: 20px;
}

.xsue-stat {
    padding: 8px 16px;
    background: #f0f9ff;
    border-radius: 8px;
    color: #1e40af;
}

.xsue-stat strong {
    font-size: 1.4em;
    color: #2563eb;
}

.xsue-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.xsue-url-list-container {
    margin-top: 20px;
}

.xsue-url-list {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    resize: vertical;
    background: #f9fafb;
}

.xsue-url-list:focus {
    outline: none;
    border-color: #2563eb;
}

/* Errors */
.xsue-errors {
    margin-top: 20px;
    padding: 16px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
}

.xsue-errors h3 {
    color: #991b1b;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.xsue-errors ul {
    margin: 0;
    padding-left: 20px;
    color: #dc2626;
}

.xsue-error-message {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border-color: #ef4444;
    background: #fef2f2;
}

.xsue-error-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.xsue-error-content h3 {
    color: #991b1b;
    margin: 0 0 8px 0;
}

.xsue-error-content p {
    color: #dc2626;
    margin: 0;
}

/* Features */
.xsue-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.xsue-feature-item {
    text-align: center;
    padding: 20px;
}

.xsue-feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    border-radius: 12px;
}

.xsue-feature-item h3 {
    font-size: 1.2em;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.xsue-feature-item p {
    font-size: 0.95em;
    color: #6b7280;
    margin: 0;
}

/* How It Works */
.xsue-steps {
    margin: 20px 0;
    padding: 0;
    list-style: none;
    counter-reset: step-counter;
}

.xsue-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 60px;
    margin-bottom: 20px;
    color: #374151;
    line-height: 1.6;
}

.xsue-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.xsue-steps li strong {
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

/* Footer */
.xsue-footer {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .xsue-container {
        margin: 20px 10px;
    }
    
    .xsue-header {
        padding: 40px 24px;
    }
    
    .xsue-header-content h1 {
        font-size: 1.8em;
    }
    
    .xsue-card {
        padding: 20px;
    }
    
    .xsue-input-group {
        flex-direction: column;
    }
    
    .xsue-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .xsue-actions {
        flex-direction: column;
    }
    
    .xsue-btn {
        width: 100%;
        justify-content: center;
    }
}

