/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

body {
    font-family: 'Poppins', sans-serif;
    padding: 20px;
    margin: 50px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: #334155; /* Default text color, e.g., Slate 700 */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    background-color: #ffffff;
    padding: 25px 35px 35px 35px;
    border-radius: 16px; /* Softer radius */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 15px rgba(0,0,0,0.05); /* Softer shadow */
    width: 100%;
    max-width: 1000px; /* Max width remains the same */
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.logo-container {
    filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
    transition: transform 0.3s ease;
    display: inline-block; 
    margin-top: 20px;
}

.logo-container:hover {
    transform: scale(1.05);
}

#headerLogo {
    display: block;
    width: 60px; /* Slightly larger logo */
    height: 60px;
}

header h1 {
    color: #000000; /* Darker blue, e.g., Blue 800/900 */
    margin: 0 0 5px 0;
    font-size: 2.2em; /* Slightly larger title */
    font-weight: 800;
}

header .tagline {
    font-size: 1em;
    color: #475569; /* e.g., Slate 600 */
    margin-top: 5px;
}

/* Key Features Section */
#keyFeaturesSection {
    display: flex;
    /*justify-content: space-around;*/
    gap: 20px;
    margin-bottom: 70px;
    margin-top: 30px;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
    justify-content: center;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 10px;
    flex: 1;
    max-width: 250px;
    min-width: 20px; /* Ensure items don't get too squished */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
}


.feature-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff; /* Icon color (often white if background is colored) */
}

.feature-item.local-processing .feature-icon-wrapper, /* Keep for specificity if needed */
.local-processing { /* More direct */
    background-color: #eff6ff; /* e.g., blue-50 */
    color: #3b82f6; /* e.g., blue-500 */
}
.feature-item.local-processing .feature-text {
    color: #1e40af; /* e.g., blue-800 */
}

.privacy-protected {
    background-color: #fffbeb; /* e.g., amber-50 */
    color: #f59e0b; /* e.g., amber-500 */
}
.privacy-protected + .feature-text {
    color: #78350f; /* e.g., amber-800 */
}

.easy-customization {
    background-color: #f0fdf4; /* e.g., emerald-50 */
    color: #10b981; /* e.g., emerald-500 */
}
.easy-customization + .feature-text {
    color: #065f46; /* e.g., emerald-800 */
}

.feature-text {
    font-weight: 500;
    font-size: 0.95em;
}


main {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

#formSection, #cardPreviewSection, #vcardInfoSection {
    flex: 1;
    min-width: 300px;
}

#formSection h2, #cardPreviewSection h2, #vcardInfoSection h2 {
    color: #1e3a8a; /* Darker blue to match header h1 */
    margin-top: 0;
    font-size: 1.6em; /* Consistent heading size */
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #60a5fa; /* Lighter blue for underline */
    display: inline-block;
    font-weight: 600;
}
.form-subheading {
    font-size: 0.9em;
    color: #4b5563; /* Gray */
    margin-top: -10px;
    margin-bottom: 20px;
}


#vcardInfoSection {
    margin-top: 40px;
    padding: 25px;
    background-color: #f1f1f1; /* e.g., slate-50 */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    
}

.steps {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    flex: 1;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    
}


#vcardInfoSection p {
    font-size: 0.95em;
    line-height: 1.7;
    color: #334155; /* e.g., slate-700 */
    text-align: left;
}


.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151; /* e.g., gray-700 */
    font-weight: 500;
    font-size: 0.9em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"] {
    width: calc(100% - 24px); /* Account for padding */
    padding: 12px;
    border: 1px solid #d1d5db; /* e.g., gray-300 */
    border-radius: 8px; /* Softer radius */
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    color: #1f2937; /* e.g., gray-800 */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="url"]:focus {
    border-color: #2563eb; /* e.g., blue-600 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); /* Lighter blue focus ring */
    outline: none;
}

button[type="submit"],
button#downloadButton {
    background-color: #2563eb; /* e.g., blue-600 */
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    width: auto;
    margin-top: 10px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

button#downloadButton {
    background-color: #059669; /* e.g., emerald-600 */
    display: none; /* Hidden by default, JS will show it */
}

button[type="submit"]:hover,
button#downloadButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

button[type="submit"]:hover {
    background-color: #1d4ed8; /* e.g., blue-700 */
}
button#downloadButton:hover {
    background-color: #047857; /* e.g., emerald-700 */
}


button[type="submit"]:disabled,
button#downloadButton:disabled {
    background-color: #9ca3af; /* e.g., gray-400 */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#cardPreviewSection {
    display: inline-block;
    flex-direction: column;
    /*align-items: center;*/
}

.business-card {
    width: 100%;
    height: 250px;
    background-color: #fdfdfd;
    border: 1px solid #e5e7eb; /* Lighter border e.g., gray-200 */
    border-radius: 12px; /* Softer radius */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    transition: all 0.3s ease; /* For hover effect */
    transform-style: preserve-3d;
    perspective: 1000px;
}
.business-card:hover {
    transform: rotateY(5deg) rotateX(2deg) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-full-name {
    font-size: 1.5em; /* Adjusted size */
    font-weight: 600;
    color: #1f2937; /* e.g., gray-800 */
    margin-bottom: 20px;
    word-break: break-word;
}

#qrCodeContainer {
    width: 170px;
    height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border: 1px dashed #cbd5e1; /* e.g., slate-300 */
    border-radius: 8px; /* Softer radius */
}

#qrCodeContainer img,
#qrCodeContainer canvas {
    display: block;
    width: 160px; 
    height: 160px;
    border-radius: 4px; /* Slightly more radius for QR image */
    margin: auto;
}

.placeholder-text {
    font-size: 0.9em;
    color: #64748b; /* e.g., slate-500 */
    padding: 10px;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.placeholder-text.error-text {
    color: #ef4444; /* e.g., red-500 */
    font-weight: 500;
}

#statusMessage {
    margin-top: 20px;
    font-size: 0.95em;
    min-height: 1.2em;
    text-align: center;
    width: 100%;
    font-weight: 500;
}

#statusMessage.success {
    color: #059669; /* e.g., emerald-600 */
}

#statusMessage.error {
    color: #dc2626; /* e.g., red-600 */
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0; /* e.g., slate-200 */
    font-size: 0.9em;
    color: #64748b; /* e.g., slate-500 */
}

/* Responsive adjustments */
@media (max-width: 920px) { /* Slightly adjusted breakpoint for key features */
    #keyFeaturesSection {
        flex-direction: column;
        align-items: center;
    }
    .feature-item {
        min-width: 300px; /* Full width on smaller screens */
        justify-content: flex-start; /* Align icon to the left */
    }
}


@media (max-width: 860px) {
    body {
        padding: 0px;
        margin: 0px;

    }
    #app {
        padding: 20px 15px 15px 15px;
        border-radius: 0px; /* Softer radius */
    }
    main {
        flex-direction: column;
        align-items: stretch;
    }
    #formSection, #cardPreviewSection {
        width: 100%;
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
    }
    .business-card {
        width: 100%;
        /*max-width: 320px;*/
        height: auto;
        min-height: 230px;
    }
    .card-full-name {
        font-size: 1.4em;
    }
    #qrCodeContainer {
        width: 150px;
        height: 150px;
    }
    #qrCodeContainer img,
    #qrCodeContainer canvas {
        width: 140px; 
        height: 140px; 
    }
    #vcardInfoSection {
        margin-top: 30px;
        padding: 20px;
    }
    #vcardInfoSection h2 {
        font-size: 1.4em; 
    }
    #vcardInfoSection p {
        font-size: 0.9em;
    }

}

@media (max-width: 480px) {

    #headerLogo {
        width: 50px;
        height: 50px;
    }
    header h1 {
        font-size: 1.9em;
    }
    .tagline {
        font-size: 0.9em;
    }
    #keyFeaturesSection {
        gap: 15px;
        margin-bottom: 25px;
    }
    .feature-item {
        padding: 10px 15px;
        gap: 10px;
    }
    .feature-icon-wrapper {
        width: 32px;
        height: 32px;
    }
    .feature-icon-wrapper svg {
        width: 18px;
        height: 18px;
    }
    .feature-text {
        font-size: 0.9em;
    }

    #formSection h2, #cardPreviewSection h2, #vcardInfoSection h2 {
        font-size: 1.35em;
    }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="url"] {
        padding: 10px;
        font-size: 0.95em;
    }
    button[type="submit"], button#downloadButton {
        padding: 12px 20px; /* Slightly more padding */
        font-size: 1em;
        width: 100%;
    }
    .business-card {
       padding: 15px;
       min-height: 210px
    }
    .card-full-name {
        font-size: 1.25em;
    }
    #qrCodeContainer {
        width: 130px;
        height: 130px;
    }
    #qrCodeContainer img,
    #qrCodeContainer canvas {
        width: 120px; 
        height: 120px; 
    }
    #vcardInfoSection {
        padding: 15px;
    }
    #vcardInfoSection h2 {
        font-size: 1.3em;
    }
}
