body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 20px;
}

h1 {
    text-align: center;
    color: #007bff;
}

.main-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.form-section {
    flex: 1;
    min-width: 300px;
}

.qr-display {
    flex: 1;
    text-align: center;
    display: block;
    min-width: 300px;
}

.qr-display {
    flex: 1;
    text-align: center;
    display: block;
    min-width: 300px;
}

.qr-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 0 auto;
    max-width: 350px;
    border: 2px solid #dee2e6 !important;
    position: relative;
    overflow: visible;
}

#qr-card-print {
    page-break-inside: avoid;
}

#qr-card-print * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
}

#qr-card-print .qr-card {
    border: 2px solid #333 !important;
}

.merchant-header {
    background-color: #f8f9fa !important;
    padding: 15px;
    border-radius: 8px !important;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #333 !important;
    border: 1px solid #dee2e6 !important;
    text-align: center;
}

.qr-container {
    margin: 20px 0 5px 0;
    padding: 15px;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef !important;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.qr-handle-display {
    font-size: 16px;
    font-weight: 500;
    color: #495057 !important;
    margin: 10px 0;
    padding: 8px;
    background-color: #f8f9fa !important;
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
    text-align: center;
    font-family: monospace;
}

.upi-handle {
    font-size: 16px;
    font-weight: 500;
    color: #495057 !important;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa !important;
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
    text-align: center;
}

.static-text {
    font-size: 14px;
    color: #6c757d !important;
    margin: 15px 0;
    font-style: italic;
    text-align: center;
}

.upi-logos {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background-color: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    min-height: 80px;
    align-items: center;
}

.upi-logos img {
    width: 100%;
    height: auto;
    max-height: 100px;
    flex: 1;
    min-width: 50px;
    object-fit: contain; /* Ensures the full logo is visible inside the box */
    display: block;
    box-sizing: border-box;
}

.card-footer {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
    border-radius: 0 0 8px 8px !important;
    text-align: center;
    font-size: 12px;
    color: #6c757d !important;
}

.card-footer a {
    color: #007bff !important;
    text-decoration: none;
}

.card-footer a:hover {
    text-decoration: underline;
}

.url-section {
    text-align: center;
    margin: 20px 0;
}

.url-section button {
    display: inline-block;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.customization {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: none;
}

.customization h3 {
    margin-top: 0;
}

#customization-section.show {
    display: block;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

#qr-code {
    margin: 20px 0;
}

/* Print styles for better PDF output */
@media print {
    .qr-card {
        box-shadow: none !important;
        border: 2px solid #000 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    
    .form-section {
        display: none !important;
    }
    
    .main-content {
        display: block !important;
    }
    
    .qr-card * {
        color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
}

.url-section {
    margin-top: 20px;
}

.download-section {
    margin-top: 20px;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    color: #666;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .container {
        padding: 15px;
    }

    .upi-logos {
        flex-wrap: wrap;
        gap: 5px;
        padding: 12px;
        min-height: 70px;
    }

    .upi-logos img {
        width: 100%;
        height: auto;
        max-height: 70px;
        flex: 1;
        min-width: 45px;
    }

    button {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    .input-group {
        margin-bottom: 10px;
    }

    .customization {
        padding: 10px;
    }

    .upi-logos {
        padding: 10px;
        min-height: 65px;
    }

    .upi-logos img {
        max-height: 65px;
        min-width: 40px;
    }
}

/* UPI Extension Dropdown Styles - Main styles */
.extension-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

#extension-dropdown.dropdown-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 120px; /* Height for ~3 items */
    overflow-y: auto;
    display: none;
    margin-top: 2px;
}

#extension-list.dropdown-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

#extension-list li {
    padding: 12px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    white-space: nowrap;
    display: block !important;
    margin: 0;
    background: none !important;
    border: none !important;
    list-style-type: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-indent: 0;
}

#extension-list li:hover {
    background-color: #f8f9fa;
}

#extension-list li:last-child {
    border-bottom: none;
}

/* SEO Section Styles */
.seo-section {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #dee2e6;
}

.seo-section h2 {
    color: #007bff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.seo-section h3 {
    color: #0056b3;
    margin-top: 25px;
    margin-bottom: 15px;
}

.seo-section p {
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.seo-section ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.seo-section ol li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.seo-section ol li strong {
    color: #333;
}

@media (max-width: 768px) {
    .seo-section {
        padding: 20px 15px;
        margin: 20px auto;
    }
    
    .seo-section h2 {
        font-size: 1.5em;
    }
    
    .seo-section p {
        font-size: 0.95em;
    }
}