/**
 * Frontend Styles for Shopify Products Sitemap Extractor
 */

/* Container */
.gse-frontend-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Cards */
.gse-frontend-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.gse-frontend-card-header {
    padding: 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.gse-frontend-card-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.gse-frontend-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.gse-frontend-card-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.gse-frontend-card-body {
    padding: 24px;
}

/* Form */
.gse-frontend-form-group {
    margin-bottom: 20px;
}

.gse-frontend-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gse-frontend-required {
    color: #dc3545;
}

.gse-frontend-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.gse-frontend-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.gse-frontend-help-text {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 13px;
}

.gse-frontend-form-actions {
    margin-top: 24px;
}

/* Buttons */
.gse-frontend-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.gse-frontend-button-primary {
    background: #007bff;
    color: #ffffff;
}

.gse-frontend-button-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.gse-frontend-button-secondary {
    background: #6c757d;
    color: #ffffff;
}

.gse-frontend-button-secondary:hover {
    background: #545b62;
}

.gse-frontend-button-large {
    padding: 14px 32px;
    font-size: 18px;
}

.gse-frontend-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gse-frontend-icon {
    font-size: 20px;
}

/* Progress */
.gse-frontend-progress-bar-container {
    width: 100%;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.gse-frontend-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.gse-frontend-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.gse-frontend-status-message {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Log */
.gse-frontend-log-container {
    margin-top: 24px;
}

.gse-frontend-log-container h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.gse-frontend-log {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.8;
}

.gse-frontend-log-entry {
    color: #333;
    margin: 4px 0;
}

.gse-frontend-log-entry.error {
    color: #dc3545;
}

/* Results */
.gse-frontend-result-success,
.gse-frontend-result-error {
    text-align: center;
    padding: 20px;
}

.gse-frontend-success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 16px;
    animation: scaleIn 0.5s ease;
}

.gse-frontend-error-icon {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 16px;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.gse-frontend-result-success h3,
.gse-frontend-result-error h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #1a1a1a;
}

.gse-frontend-result-stats {
    font-size: 18px;
    color: #666;
    margin: 16px 0 32px 0;
}

.gse-frontend-result-stats strong {
    color: #28a745;
    font-size: 36px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.gse-frontend-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.gse-frontend-error-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 16px;
    color: #856404;
    margin: 16px 0 24px 0;
}

/* Login Required */
.gse-frontend-login-required {
    text-align: center;
    padding: 40px 20px;
}

.gse-frontend-icon-large {
    font-size: 64px;
    margin-bottom: 16px;
}

.gse-frontend-login-required h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #1a1a1a;
}

.gse-frontend-login-required p {
    margin: 0 0 24px 0;
    color: #666;
    font-size: 16px;
}

/* Help Card */
.gse-frontend-help-card {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.gse-frontend-help-list {
    margin: 0;
    padding-left: 24px;
}

.gse-frontend-help-list li {
    margin-bottom: 12px;
    color: #495057;
    line-height: 1.6;
}

/* Loading State */
.gse-frontend-loading {
    opacity: 0.6;
    pointer-events: none;
}

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

.gse-frontend-card {
    animation: fadeIn 0.4s ease;
}

/* Scrollbar */
.gse-frontend-log::-webkit-scrollbar {
    width: 8px;
}

.gse-frontend-log::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.gse-frontend-log::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.gse-frontend-log::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .gse-frontend-container {
        padding: 0 16px;
        margin: 20px auto;
    }
    
    .gse-frontend-card-header {
        padding: 20px 16px;
    }
    
    .gse-frontend-card-body {
        padding: 20px 16px;
    }
    
    .gse-frontend-card-header h2 {
        font-size: 20px;
    }
    
    .gse-frontend-result-actions {
        flex-direction: column;
    }
    
    .gse-frontend-button-large {
        width: 100%;
        padding: 12px 24px;
        font-size: 16px;
    }
}
