/* Card Designer Tab */
.designer-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 48px;
}

.designer-controls {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
}

.design-section {
    background: white;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.design-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.row-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    display: block;
}

.control-group input[type="text"],
.control-group input[type="number"],
.modern-select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px 16px;
    border-radius: 12px;
    color: #1e293b;
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s ease;
}

.control-group input:focus,
.modern-select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.color-picker-wrapper {
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    padding: 6px;
    gap: 12px;
    transition: border-color 0.2s;
    cursor: pointer;
}

.color-picker-wrapper:hover {
    border-color: #cbd5e1;
}

.color-picker-wrapper input[type="color"] {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
}

.location-coords {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.phone-mockup-small {
    width: 320px;
    height: 640px;
    background: #111827;
    border-radius: 48px;
    padding: 12px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.3);
    border: 8px solid #334155;
    margin: 0 auto;
    position: sticky;
    top: 40px;
    display: flex;
    flex-direction: column;
}

.phone-mockup-small .wallet-pass {
    margin: auto 0;
}

/* Mobile Overrides for Designer */
@media (max-width: 1024px) {
    .designer-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .phone-mockup-small {
        position: relative;
        top: 0;
        margin-top: 32px;
    }
}

@media (max-width: 768px) {
    .designer-layout {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .design-section {
        padding: 24px 16px;
    }

    .row-2-col,
    .color-grid,
    .location-coords {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .phone-mockup-small {
        order: -1;
        position: relative;
        top: 0;
        margin: 0 auto;
        transform: scale(0.9);
        height: 580px;
    }

    .designer-preview {
        order: -1;
        margin-bottom: 24px;
        position: sticky;
        top: 80px;
        z-index: 100;
        background: transparent;
    }
}

@media (max-width: 600px) {
    .color-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }

    .color-grid .control-group label,
    .color-grid .color-value {
        display: none !important;
    }

    .color-grid .color-picker-wrapper {
        justify-content: center;
        padding: 4px;
        height: 48px;
    }

    .color-grid .color-picker-wrapper input[type="color"] {
        width: 100%;
        height: 100%;
    }
}

/* Stamp Grid Styles */
.stamp-grid-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.stamp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 260px;
}

.stamp {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stamp.active {
    background: white;
    color: #6366f1;
    /* Default, will be dynamic */
    border-style: solid;
    border-color: white;
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Adjustments for larger stamp counts */
.stamp-grid.dense .stamp {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    gap: 8px;
}

/* Stamp Icon Picker */
.stamp-icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stamp-icon-option {
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.stamp-icon-option:hover:not(.locked) {
    border-color: var(--primary);
    transform: scale(1.1);
}

.stamp-icon-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.stamp-icon-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.stamp-icon-option.locked::after {
    content: '🔒';
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.6rem;
    background: #f8fafc;
    border-radius: 50%;
    padding: 2px;
}