/*
Theme Name: PostBanao QR Generator Theme
Theme URI: https://qr.postbanao.com
Author: Your Name or PostBanao Team
Author URI: https://postbanao.com
Description: A custom WordPress theme for the Stylish QR Code Generator for qr.postbanao.com.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: postbanao-qr

This is the main stylesheet for the PostBanao QR Generator Theme, updated for QR Planet look.
*/

/* General Body & Layout */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f0f2f5 0%, #e0e6ed 100%);
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed to flex-start to allow scrolling */
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding: 20px; /* Add some padding around the container */
    box-sizing: border-box;
}

/* Main Container */
.qr-generator-container {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 40px; /* Adjusted padding */
    max-width: 1200px; /* Increased max-width */
    width: 95%;
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Adjusted gap */
    animation: fadeIn 0.8s ease-out;
    margin-top: 50px; /* Space from top */
    margin-bottom: 50px; /* Space from bottom */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    width: 100%;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 700;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

h1 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

h1 a:hover {
    color: #3498db;
}

/* Input & Controls Section */
.qr-controls {
    flex: 3;
    min-width: 450px; /* Increased min-width for controls */
}

.qr-controls h3 {
    color: #34495e;
    margin-bottom: 25px;
    padding-bottom: 10px;
    font-size: 1.6em;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-controls h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 5px;
}

/* Type Selector Buttons (Top row) */
.type-selector-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    background-color: #f7f9fb;
    border-radius: 12px;
    padding: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.type-button {
    background-color: transparent;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1em;
    color: #555;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    flex: 1; /* Allows buttons to share space */
    min-width: 80px; /* Minimum width for buttons */
}

.type-button:hover {
    background-color: #e6e9ee;
    transform: translateY(-1px);
}

.type-button.active {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    transform: translateY(-1px);
}

.type-button .fa-solid {
    font-size: 1.1em;
}

/* Form Fields */
.qr-form-section label {
    display: block;
    margin-bottom: 8px; /* Adjusted margin */
    font-weight: 600;
    color: #4a4a4a;
    font-size: 1em; /* Adjusted font size */
}

.qr-form-section input[type="text"],
.qr-form-section textarea,
.qr-form-section input[type="password"],
.qr-form-section select {
    width: calc(100% - 24px);
    padding: 12px; /* Adjusted padding */
    margin-bottom: 18px; /* Adjusted margin */
    border: 1px solid #ccc;
    border-radius: 8px; /* Adjusted border-radius */
    font-size: 0.95em; /* Adjusted font size */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.qr-form-section input[type="checkbox"] {
    margin-right: 8px; /* Adjusted margin */
}

.qr-form-section input[type="text"]:focus,
.qr-form-section textarea:focus,
.qr-form-section input[type="password"]:focus,
.qr-form-section select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.qr-form-section textarea {
    resize: vertical;
    min-height: 100px; /* Adjusted min-height */
}

/* Color Inputs */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Adjusted gap */
    margin-bottom: 15px; /* Adjusted margin */
}
.color-input-group label {
    flex-basis: 120px; /* Adjusted flex-basis */
    margin-bottom: 0;
}
.color-input-group input[type="color"] {
    width: 60px; /* Adjusted width */
    height: 38px; /* Adjusted height */
    padding: 4px; /* Adjusted padding */
    border-radius: 6px; /* Adjusted border-radius */
}

/* Logo Upload */
.logo-upload-section {
    margin-top: 20px; /* Adjusted margin */
    padding-top: 15px; /* Adjusted padding */
    border-top: 1px dashed #e0e6ed;
}
.logo-upload-section input[type="file"] {
    display: block;
    margin-top: 12px; /* Adjusted margin */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-size: 0.9em; /* Adjusted font size */
    width: calc(100% - 18px);
}
.logo-preview-area {
    margin-top: 15px; /* Adjusted margin */
    text-align: center;
    min-height: 100px; /* Adjusted min-height */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e0e6ed;
    border-radius: 10px;
    padding: 8px; /* Adjusted padding */
    background-color: #fcfcfc;
}
.logo-preview-area img {
    max-width: 80px; /* Adjusted max-width */
    max-height: 80px; /* Adjusted max-height */
    border-radius: 6px; /* Adjusted border-radius */
}

/* Collapsible Section Styling (for Logo, Colors, Frames) */
.collapsible-section {
    background-color: #f7f9fb;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #34495e;
    font-size: 1.1em;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e6ed;
    margin-bottom: 10px;
}

.collapsible-header i {
    transition: transform 0.3s ease;
}

.collapsible-header.active i {
    transform: rotate(90deg); /* Rotate icon when active */
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding-top: 0;
}

.collapsible-content.active {
    max-height: 500px; /* Sufficiently large for content */
    padding-top: 15px;
}


/* Design Templates Section */
.design-templates-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #e0e6ed;
}

.design-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Adjusted grid columns */
    gap: 15px;
    margin-top: 20px;
}

.design-template-item {
    background-color: #ffffff;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.design-template-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.design-template-item.selected {
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.4);
}

.design-template-item img {
    max-width: 90%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.design-template-item span {
    display: block;
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

/* QR Code Preview & Download Section */
.qr-preview {
    flex: 2;
    min-width: 320px; /* Adjusted min-width */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
}

.qr-preview h3 {
    color: #34495e;
    margin-bottom: 25px;
    padding-bottom: 10px;
    font-size: 1.6em;
    font-weight: 600;
    width: 100%;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qr-preview h3::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #2ecc71, #3498db);
    border-radius: 5px;
}

.qr-code-image-wrapper {
    width: 320px; /* Larger size */
    height: 320px; /* Larger size */
    background-color: #ecf0f1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px; /* Adjusted margin */
    overflow: hidden;
    position: relative; /* For potential overlay */
}
.qr-code-image-wrapper img {
    max-width: 100%; /* Fill wrapper */
    max-height: 100%; /* Fill wrapper */
    object-fit: contain;
    transition: transform 0.3s ease;
}
.qr-code-image-wrapper img:hover {
    transform: scale(1.02);
}

/* Play button overlay (purely visual for now) */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 0, 0, 0.8); /* Red, transparent */
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 1; /* Always visible for now */
    transition: opacity 0.3s ease;
}

.play-button-overlay i {
    color: white;
    font-size: 3em;
}

.qr-code-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #777;
}

.qr-code-info a {
    color: #3498db;
    text-decoration: none;
}

.qr-code-info a:hover {
    text-decoration: underline;
}


.download-buttons-group {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 12px; /* Space between buttons */
    width: 100%; /* Make buttons fill width */
    max-width: 300px; /* Max width for buttons */
}

.download-button,
.create-dynamic-button {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 18px 25px; /* Adjusted padding */
    font-size: 1.1em; /* Adjusted font size */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
    display: flex;
    align-items: center;
    justify-content: center; /* Center content */
    gap: 10px;
    font-weight: 600;
    text-decoration: none; /* For link-like button */
    width: 100%; /* Fill group width */
    box-sizing: border-box; /* Include padding in width */
}

.download-button:hover,
.create-dynamic-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.5);
}

.create-dynamic-button {
    background: linear-gradient(45deg, #3498db, #2980b9); /* Different color for dynamic */
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.create-dynamic-button:hover {
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.5);
}

.qr-bottom-text {
    text-align: center;
    font-size: 0.8em;
    color: #777;
    margin-top: 15px;
    width: 100%;
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    .qr-generator-container {
        padding: 30px;
        gap: 25px;
    }
    .qr-controls, .qr-preview {
        min-width: unset;
        width: 100%;
    }
    h1 {
        font-size: 2em;
    }
    .qr-controls h3, .qr-preview h3 {
        font-size: 1.4em;
        text-align: left;
        justify-content: flex-start; /* Align left */
    }
    .qr-preview h3::after {
        left: 0;
        transform: translateX(0);
    }
    .qr-preview {
        order: -1; /* Move preview to top on smaller screens */
        padding-top: 0;
    }
    .type-button {
        flex: auto; /* Allow wrap, but don't force equal width */
        min-width: unset;
    }
    .design-template-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* Smaller items on mobile */
    }
    .qr-code-image-wrapper {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }
    .qr-generator-container {
        padding: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .type-button {
        padding: 10px 15px;
        font-size: 0.85em;
        gap: 5px;
    }
    .qr-form-section input[type="text"],
    .qr-form-section textarea {
        padding: 10px;
        margin-bottom: 12px;
    }
    .download-button, .create-dynamic-button {
        padding: 15px 20px;
        font-size: 1em;
    }
    .qr-code-image-wrapper {
        width: 250px;
        height: 250px;
    }
    .play-button-overlay {
        width: 60px;
        height: 60px;
    }
    .play-button-overlay i {
        font-size: 2.5em;
    }
    .design-template-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}