/* === Progress Container === */
.progress-container {
    background: #fff;
    border: 3px solid #2c2c2c;
    padding: 40px;
    margin: 40px 0;
    position: relative;
    box-shadow: 
        10px 10px 0 #d4a574,
        10px 10px 0 3px #2c2c2c;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    transition: all 0.3s ease-out;
}

.progress-container.active {
    opacity: 1;
    transform: translateY(0);
}

.progress-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed #d4a574;
    pointer-events: none;
}

.progress-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 69, 19, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 82, 45, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* === Progress Header === */
.progress-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.progress-header h3 {
    color: #2c2c2c;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.progress-header h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #d4a574;
}

/* === Progress Content === */
.progress-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* === Progress Message === */
.progress-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    color: #2c2c2c;
    font-weight: 600;
    min-height: 30px;
}

.progress-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f7f5f0;
    border-top: 3px solid #2c2c2c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-check {
    width: 20px;
    height: 20px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* === Progress Bar === */
.progress-bar-container {
    margin: 25px 0;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f7f5f0;
    border: 2px solid #2c2c2c;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px dashed #d4a574;
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4a574, #b8956a);
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: shimmer 1.5s infinite;
}

.progress-text {
    margin-top: 10px;
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    color: #2c2c2c;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Progress Media === */
.progress-media {
    margin: 30px 0;
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-media img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
}

.progress-media img:hover {
    transform: scale(1.02);
}

/* === Progress Link === */
.progress-link {
    margin-top: 30px;
    animation: celebrate 0.6s ease-in-out;
}

.etsy-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #2c2c2c;
    color: #f7f5f0;
    text-decoration: none;
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    border: none;
}

.etsy-button::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px dashed #d4a574;
    pointer-events: none;
}

.etsy-button:hover {
    background: #f7f5f0;
    color: #2c2c2c;
    transform: translate(-3px, -3px);
    box-shadow: 
        8px 8px 0 #d4a574,
        8px 8px 0 3px #2c2c2c;
}

.button-icon {
    font-size: 18px;
}

.preview-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 256px; /* All boxes same width */
}

.image-container {
    width: 100%;
    height: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Progress Tracker Enhancement Styles */
/* Add this to your existing CSS file */

/* Form transition styles */
#designForm {
    transition: all 0.5s ease-out;
}

#designForm.tracking-mode {
    transform: translateY(-20px);
    opacity: 0.3;
    pointer-events: none;
}

.form-hidden {
    display: none !important;
}

/* Timeout warning animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

/* Timeout warning styles */
.timeout-warning {
    animation: fadeInWarning 0.5s ease-in-out;
}

.progress-warning-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

/* Error action buttons */
.error-actions {
    margin-top: 15px;
}

.retry-btn, 
.refresh-btn {
    margin-right: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.retry-btn {
    background: #007cba;
    color: white;
}

.retry-btn:hover {
    background: #005a87;
}

.refresh-btn {
    background: #6c757d;
    color: white;
}

.refresh-btn:hover {
    background: #545b62;
}

/* Patience message styling */
.patience-message {
    color: #856404;
    font-style: italic;
    font-size: 13px;
}


/* Resume message notification */
.resume-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
}

.resume-notification.slide-out {
    animation: slideOutRight 0.5s ease-in;
}

.progress-container.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .retry-btn, 
    .refresh-btn {
        display: block;
        width: 100%;
        margin-bottom: 8px;
        margin-right: 0;
    }
    
    .resume-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* All CSS extracted from progress-tracker.js */
/* Add this to your existing CSS file */

/* Resume notification message */
.resume-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
}

.resume-notification.slide-out {
    animation: slideOutRight 0.5s ease-in;
}

.resume-notification .flex-content {
    display: flex;
    align-items: center;
}

.resume-notification .icon {
    margin-right: 8px;
}

/* Timeout warning styles */
.timeout-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
    animation: fadeInWarning 0.5s ease-in-out;
}

/* Form error message */
.form-error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ffcdd2;
    margin-top: 15px;
    font-size: 14px;
}

.form-error-message .flex-content {
    display: flex;
    align-items: flex-start;
}

.form-error-message .icon {
    margin-right: 8px;
}

/* Share section styling */
.share-section {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.share-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 8px;
}

.copy-btn {
    margin-top: 8px;
    padding: 6px 12px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    background: #005a87;
}

.share-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Etsy link styling */
.etsy-link {
    display: inline-block;
    background: #f56500;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 15px;
}

.etsy-link:hover {
    background: #d4540a;
    color: white;
    text-decoration: none;
}

/* Note section */
.etsy-note {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e8f4f8;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
    font-size: 14px;
    color: #1976D2;
}

/* Create another design button */
.create-another-btn {
    display: inline-block;
    background: #555;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 10px;
}

.create-another-btn:hover {
    background: #333;
    color: white;
    text-decoration: none;
}

/* Form loading spinner */
.form-loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

/* Progress warning icon */
.progress-warning-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

/* Error action buttons */
.error-actions {
    margin-top: 15px;
}

.retry-btn, 
.refresh-btn {
    margin-right: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.retry-btn {
    background: #007cba;
    color: white;
}

.retry-btn:hover {
    background: #005a87;
}

.refresh-btn {
    background: #6c757d;
    color: white;
}

.refresh-btn:hover {
    background: #545b62;
}

.patience-message {
    color: #856404;
    font-style: italic;
    font-size: 13px;
}

/* Form transitions */
#designForm {
    transition: all 0.5s ease-out;
}

#designForm.tracking-mode {
    transform: translateY(-20px);
    opacity: 0.3;
    pointer-events: none;
}

.form-hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .retry-btn, 
    .refresh-btn {
        display: block;
        width: 100%;
        margin-bottom: 8px;
        margin-right: 0;
    }
    
    .resume-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .share-section {
        margin-top: 10px;
        padding: 8px;
    }
}

/* === Animations === */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes celebrate {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .progress-container {
        padding: 25px;
        margin: 25px 10px;
        box-shadow: 
            5px 5px 0 #d4a574,
            5px 5px 0 2px #2c2c2c;
    }
    
    .progress-header h3 {
        font-size: 24px;
    }
    
    .progress-message {
        font-size: 14px;
    }
    
    .progress-media img {
        max-width: 280px;
    }
    
    .etsy-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .progress-container {
        padding: 20px;
    }
    
    .progress-bar {
        height: 16px;
    }
    
    .progress-media img {
        max-width: 250px;
    }
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    .preview-container {
        flex-direction: column;
        align-items: center;
    }
}
