/* Wristband Mockup Generator Styles */

/* Base Container */
.wmg-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.wmg-header {
    text-align: center;
    margin-bottom: 30px;
}

.wmg-header h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.wmg-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

/* Step Progress */
.wmg-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
}

.wmg-step {
    display: flex;
    align-items: center;
    margin: 0 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.wmg-step.wmg-step-active,
.wmg-step.wmg-step-completed {
    opacity: 1;
}

.wmg-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ecf0f1;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.wmg-step.wmg-step-active .wmg-step-number {
    background: #3498db;
    color: white;
}

.wmg-step.wmg-step-completed .wmg-step-number {
    background: #27ae60;
    color: white;
}

.wmg-step-text {
    font-weight: 500;
    color: #2c3e50;
}

/* Progress Bar */
.wmg-progress-bar {
    width: 100%;
    height: 4px;
    background: #ecf0f1;
    border-radius: 2px;
    margin-bottom: 40px;
    overflow: hidden;
}

.wmg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Step Content */
.wmg-step-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.wmg-step-content.wmg-step-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload Section */
.wmg-upload-section {
    margin-bottom: 30px;
}

.wmg-upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wmg-upload-area:hover,
.wmg-upload-area.wmg-drag-over {
    border-color: #3498db;
    background: #e8f4fd;
    transform: translateY(-2px);
}

.wmg-upload-icon {
    margin-bottom: 15px;
}

.wmg-upload-icon svg {
    color: #7f8c8d;
    width: 48px;
    height: 48px;
}

.wmg-upload-content h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.wmg-upload-content p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

.wmg-browse-button {
    background: none;
    border: none;
    color: #3498db;
    text-decoration: underline;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.wmg-browse-button:hover {
    color: #2980b9;
}

.wmg-file-info {
    margin-top: 15px;
}

.wmg-file-info small {
    color: #95a5a6;
    font-size: 14px;
}

/* Upload Preview */
.wmg-upload-preview {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    margin-top: 20px;
}

.wmg-preview-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wmg-preview-container img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
}

.wmg-preview-info {
    flex: 1;
}

.wmg-preview-info h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    word-break: break-all;
}

/* Wristband Selection */
.wmg-wristband-selection {
    margin-bottom: 30px;
}

.wmg-wristband-selection h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.wmg-wristband-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.wmg-wristband-option {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.wmg-wristband-option:hover {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

.wmg-wristband-option.wmg-option-selected {
    border-color: #3498db;
    background: #e8f4fd;
}

.wmg-wristband-option input[type="radio"] {
    display: none;
}

.wmg-option-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wmg-option-image {
    width: 80px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    text-align: center;
    flex-shrink: 0;
}

.wmg-option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.wmg-option-info h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.wmg-option-info p {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

/* Design Recommendation */
.wmg-design-recommendation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.wmg-recommendation-content h4 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wmg-recommendation-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.wmg-recommendation-content small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.3;
    display: block;
}

#wmg-rec-size {
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.wmg-button {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
}

.wmg-button-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.wmg-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.wmg-button-primary:disabled,
.wmg-button-primary.wmg-button-disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wmg-button-secondary {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.wmg-button-secondary:hover {
    background: #d5dbdb;
}

/* Step Actions */
.wmg-step-actions {
    text-align: center;
    margin-top: 30px;
}

/* Step 2: Generating */
.wmg-generating {
    text-align: center;
    padding: 60px 40px;
}

.wmg-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
}

.wmg-spinner-svg {
    width: 100%;
    height: 100%;
    animation: rotate 1s linear infinite;
}

.wmg-spinner-path {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
    stroke: #3498db;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.wmg-generating h3 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.wmg-generating p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

/* Step 3: Result */
.wmg-result-section {
    text-align: center;
}

.wmg-result-section h3 {
    color: #27ae60;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 30px 0;
}

.wmg-mockup-preview {
    margin-bottom: 30px;
}

.wmg-mockup-container {
    display: inline-block;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.wmg-mockup-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.wmg-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.wmg-result-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #f39c12;
}

.wmg-result-info p {
    color: #2c3e50;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Messages */
.wmg-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.wmg-message {
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
}

.wmg-message-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.wmg-message-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.wmg-message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wmg-message-close:hover {
    opacity: 1;
}

.wmg-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wmg-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wmg-message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Error State */
.wmg-error-state {
    text-align: center;
    padding: 60px 40px;
}

.wmg-error-icon {
    margin-bottom: 20px;
}

.wmg-error-icon svg {
    color: #e74c3c;
    width: 48px;
    height: 48px;
}

.wmg-error-state h3 {
    color: #e74c3c;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.wmg-error-state p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0 0 30px 0;
}

/* Force load styles - Theme compatibility */
body .wmg-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.wmg-container * {
    box-sizing: border-box;
}

.wmg-container img {
    max-width: 100%;
    height: auto;
}

.wmg-container input, 
.wmg-container button {
    font-family: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wmg-container {
        margin: 10px;
        padding: 15px;
        border-radius: 8px;
    }

    .wmg-header h2 {
        font-size: 24px;
    }

    .wmg-steps {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .wmg-step {
        margin: 0;
    }

    .wmg-upload-area {
        padding: 40px 20px;
    }

    .wmg-preview-container {
        flex-direction: column;
        text-align: center;
    }

    .wmg-option-content {
        flex-direction: column;
        text-align: center;
    }

    .wmg-result-actions {
        flex-direction: column;
        align-items: center;
    }

    .wmg-button {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }

    .wmg-messages {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .wmg-container {
        margin: 5px;
        padding: 10px;
    }

    .wmg-header h2 {
        font-size: 20px;
    }

    .wmg-step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .wmg-step-text {
        font-size: 14px;
    }

    .wmg-upload-area {
        padding: 30px 15px;
    }

    .wmg-upload-content h3 {
        font-size: 18px;
    }
}