/* General Layout */
#c4z-customizer-form {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    color: #333;
}

/* Headings */
#c4z-customizer-form h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#c4z-customizer-form h4 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 8px;
}

/* Inputs */
#c4z-customizer-form input[type="text"],
#c4z-customizer-form input[type="file"],
#c4z-customizer-form input[type="url"],
#c4z-customizer-form input[type="tel"],
#c4z-customizer-form input[type="email"],
#c4z-customizer-form select,
#c4z-customizer-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Buttons */
#c4z-customizer-form button,
#c4z-customizer-form input[type="submit"] {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.2s;
}

#c4z-customizer-form button:hover,
#c4z-customizer-form input[type="submit"]:hover {
    background-color: #004c99;
}

/* Radio Groups */
#driver-type-selection label,
#step-1 label,
#step-2 label {
    display: block;
    margin-bottom: 8px;
}

/* Icon Previews */
.preview-box {
    width: 120px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 20px auto;
}

.preview-box img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.preview-text {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.driver-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.driver-card {
    flex: 1 1 calc(33.333% - 10px);
    text-align: center;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-width: 150px;
}

.driver-card:hover {
    background-color: #e9f2ff;
}

input[type="radio"]:checked + .driver-card {
    border-color: #0066cc;
    background-color: #e6f2ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.step1-flex-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.preview-column {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-column {
    flex: 1;
    min-width: 300px;
}

.icon-section-header {
    background-color: #e6f2ff;
    padding: 12px 16px;
    font-weight: bold;
    font-size: 16px;
    border-radius: 6px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.preview-column {
    flex: 0 0 140px;
}

.input-column {
    flex: 1;
    min-width: 0;
}

.final-previews {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
    text-align: center;
}
.final-previews div {
    text-align: center;
}

#c4z-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c4z-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ccc;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spinC4Z 1s linear infinite;
}

@keyframes spinC4Z {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search + Pagination Sections */
#selected_search_section,
#unselected_search_section {
    margin-top: 10px;
    margin-bottom: 30px;
}

/* Wraps the search + results inside a consistent container */
.freepik-results-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

/* Grid layout for Freepik icons */
#freepik_results,
#freepik_unselected_results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 14px;
    background: #fff;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    justify-items: center; /* centers items within each cell */
}

/* Icon styles */
.freepik-item {
    width: 64px;
    height: 64px;
    cursor: pointer;
    object-fit: contain;
}

/* QR Code Specific Styles */
.qr-type-selection {
    margin-bottom: 20px;
}

.qr-type-selector {
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    margin-top: 10px;
}

.qr-input-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.qr-input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

textarea.qr-input {
    min-height: 100px;
    resize: vertical;
}

.qr-generate-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    transition: background-color 0.2s;
    width: 100%;
}

.qr-generate-btn:hover {
    background-color: #3d8b40;
}

/* QR Background Options */
.qr-bg-selection {
    margin-bottom: 20px;
}

.qr-background-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.qr-color-picker {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
    transition: opacity 0.2s, border-color 0.2s;
}

/* Style for disabled color picker */
.qr-color-picker:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ddd;
}

/* Style for enabled color picker */
.qr-color-picker:not(:disabled) {
    border-color: #0066cc;
    box-shadow: 0 0 3px rgba(0, 102, 204, 0.3);
}

.qr-background-options label {
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.qr-background-options input[type="radio"] {
    margin-right: 5px;
}

/* QR Code Color Options */
.qr-color-options {
    margin-top: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.qr-color-options label {
    margin-right: 10px;
    margin-bottom: 0;
    font-weight: 500;
}

/* Make the color picker a bit larger and more prominent */
.qr-color-picker {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #0066cc;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
    transition: box-shadow 0.2s;
}

.qr-color-picker:hover {
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
}