/* ======================================
   JERSEY CUSTOMIZER STYLES
   Optimized for iPad kiosk experience
   ====================================== */

/* Container */
.jc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Steps */
.jc-step {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.jc-step.jc-active {
    display: block;
}

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

/* Header */
.jc-header {
    text-align: center;
    margin-bottom: 30px;
}

.jc-header h2 {
    font-size: 32px;
    color: #001F3F;
    margin: 0 0 10px 0;
}

.jc-header p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Preview Wrapper */
.jc-preview-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.jc-preview-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.jc-jersey-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Text Overlay (Step 1) */
.jc-text-overlay {
    position: absolute;
    top: 15%;
    left: 17%;
    width: 66%;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.jc-name-text {
    font-family: 'Jersey Custom Font', 'Impact', sans-serif;
    font-size: 48px;
    font-weight: 900;
    color: #001F3F;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    line-height: 1.2;
}

/* Hidden input for iOS keyboard */
.jc-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#jc-name-input:not(.jc-hidden-input) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    font-size: 24px;
    padding: 10px;
    border: 2px solid #001F3F;
    border-radius: 4px;
    text-align: center;
    text-transform: uppercase;
    opacity: 1;
    pointer-events: all;
}

/* Character Count */
.jc-character-count {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

#jc-char-count {
    font-weight: 700;
    color: #001F3F;
}

/* Design Overlay (Sleeve Steps) */
.jc-design-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

/* Design Grid */
.jc-design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.jc-design-option {
    background: #fff;
    border: 3px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.jc-design-option:hover {
    border-color: #001F3F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,31,63,0.2);
}

.jc-design-option.jc-active {
    border-color: #001F3F;
    background: #f0f8ff;
    box-shadow: 0 4px 16px rgba(0,31,63,0.3);
}

.jc-design-option img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.jc-design-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Summary */
.jc-summary {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.jc-summary-item {
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
}

.jc-summary-item:last-child {
    margin-bottom: 0;
}

.jc-summary-item strong {
    color: #001F3F;
}

/* Phone Input */
.jc-phone-wrapper {
    max-width: 400px;
    margin: 0 auto 30px;
}

.jc-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #001F3F;
    margin-bottom: 10px;
}

.jc-input {
    width: 100%;
    font-size: 20px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.jc-input:focus {
    outline: none;
    border-color: #001F3F;
    box-shadow: 0 0 0 3px rgba(0,31,63,0.1);
}

/* Actions */
.jc-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.jc-btn {
    font-size: 18px;
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 56px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jc-btn-primary {
    background: #001F3F;
    color: #fff;
}

.jc-btn-primary:hover:not(:disabled) {
    background: #003366;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,31,63,0.3);
}

.jc-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.jc-btn-secondary:hover {
    background: #5a6268;
}

.jc-btn-success {
    background: #28a745;
    color: #fff;
    font-size: 20px;
}

.jc-btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.jc-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading Overlay */
.jc-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.jc-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #001F3F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.jc-loading p {
    color: #fff;
    font-size: 20px;
    margin-top: 20px;
}

/* iPad Landscape Optimization */
@media (min-width: 768px) and (orientation: landscape) {
    .jc-container {
        padding: 0px;
    }
    
    .jc-preview-container {
        max-width: 700px;
    }
    
    .jc-name-text {
        font-size: 56px;
    }
    
    .jc-design-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .jc-design-option {
        padding: 20px;
    }
    
    .jc-design-option img {
        width: 120px;
        height: 120px;
    }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .jc-header h2 {
        font-size: 24px;
    }
    
    .jc-header p {
        font-size: 16px;
    }
    
    .jc-name-text {
        font-size: 32px;
    }
    
    .jc-design-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .jc-design-option img {
        width: 80px;
        height: 80px;
    }
    
    .jc-btn {
        font-size: 16px;
        padding: 14px 24px;
    }
}
/* Disabled design option */
.jc-design-option.jc-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
    display: none !important;
}

.jc-design-option.jc-disabled::after {
    content: "USED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}


