/* ============================================================
   IDMS BUSINESS CARD GENERATOR - SPECIALIZED STYLES
   ============================================================ */

.business-card {
    width: 321px; /* 85mm * 3.78px/mm */
    height: 204px; /* 54mm * 3.78px/mm */
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: default;
    user-select: none;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1), 0 20px 25px -5px rgba(0,0,0,0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-preview {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.template-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.template-card.active {
    border-color: #16A34A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

/* Template Layouts */
.luxury-template { background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #D4AF37 100%); color: #2c3e50; }
.luxury-template-pdf { background: #D4AF37; color: #2c3e50; }

.executive-template { background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%); color: white; }
.executive-template-pdf { background: #2c3e50; color: white; }

.gradient-template { background: linear-gradient(135deg, #16A34A 0%, #07A569 100%); color: white; }
.gradient-template-pdf { background: #16A34A; color: white; }

.dark-template { background: linear-gradient(135deg, #052E16 0%, #0A2E1A 100%); color: white; }
.dark-template-pdf { background: #052E16; color: white; }

.minimalist-template { background: #ffffff; color: #1a1a1a; border: 1px solid #e5e7eb; }
.minimalist-template-pdf { background: #ffffff; color: #1a1a1a; }

.geometric-template { background: #f8fafc; color: #0f172a; position: relative; z-index: 1; }
.geometric-template::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 30%;
    background: #16A34A; clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%); z-index: -1;
}
.geometric-template-pdf { background: #f8fafc; color: #0f172a; }

.corporate-template { background: #cbd5e1; color: #1e293b; border-left: 15px solid #1e293b; }
.corporate-template-pdf { background: #cbd5e1; color: #1e293b; }

.glass-template {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); color: #064e3b;
    backdrop-filter: blur(8px); border: 1px solid rgba(22, 163, 74, 0.2);
}
.glass-template-pdf { background: #f0fdf4; color: #064e3b; }

.duo-front { background: linear-gradient(135deg, #052e16 0%, #064e3b 100%); color: white; }
.duo-back { background: #ffffff; color: #1a1a1a; border: 1px solid #e5e7eb; }
.duo-front-pdf { background: #052e16; color: white; }
.duo-back-pdf { background: #ffffff; color: #1a1a1a; }

.pdf-render-area {
    position: fixed; left: -10000px; top: -10000px;
    width: 350px; height: 200px; z-index: -1000;
}

.modal-enter { opacity: 0; transform: scale(0.95); }
.modal-enter-active { opacity: 1; transform: scale(1); transition: opacity 0.3s ease, transform 0.3s ease; }

.side-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #94a3b8;
    margin-bottom: 0.5rem; /* Reduced */
    margin-top: 1.5rem;   /* Added to fix desktop overlap */
    display: block;
    text-align: center;
}

.error-input {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

/* intl-tel-input customization */
.iti { width: 100%; }
.iti__flag-container { border-radius: 0.75rem 0 0 0.75rem; }

/* Horizontal Template Ribbon for better UX */
#templateSelection {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 640px) {
    #templateSelection {
        display: flex;
        overflow-x: auto;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .template-card {
        min-width: 100px;
        scroll-snap-align: start;
    }
}
/* Color Selector Dropdown */
#templateDropdownContainer {
    position: relative;
    max-width: 200px;
    margin: 0 auto;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #16A34A;
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.2);
}

/* Custom Color Picker Styling */
#brandColor {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 44px;
    height: 44px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

#brandColor::-webkit-color-swatch {
    border-radius: 12px;
    border: 2px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

#brandColor::-moz-color-swatch {
    border-radius: 12px;
    border: 2px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
