/* =========================================================
   QR BUSINESS CARD GENERATOR
   COMPLETE FRONTEND CSS
   ========================================================= */


/* =========================================================
   RESET / BASE
   ========================================================= */

.qbc-generator,
.qbc-generator *,
.qbc-generator *::before,
.qbc-generator *::after {
    box-sizing: border-box;
}

.qbc-generator {
    width: 100%;
    max-width: 1200px;
    margin: 35px auto;
    padding: 0 18px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: #17233c;
    line-height: 1.5;
}


/* =========================================================
   MAIN OUTER CARD
   ========================================================= */

.qbc-main-card {
    width: 100%;
    padding: 30px;

    background: #ffffff;

    border: 1px solid #e3e8f1;
    border-radius: 18px;

    box-shadow:
        0 4px 20px rgba(30, 50, 90, 0.05);
}


/* =========================================================
   HEADER
   ========================================================= */

.qbc-generator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    margin-bottom: 28px;
}

.qbc-header-content {
    min-width: 0;
}

.qbc-header-content h1 {
    margin: 0 0 7px;

    color: #14213d;

    font-size: 36px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -1px;
}

.qbc-header-content p {
    margin: 0;

    color: #667085;

    font-size: 17px;
    line-height: 1.5;
}

.qbc-header-icon {
    width: 72px;
    height: 72px;

    flex: 0 0 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f0f4ff;

    border-radius: 12px;

    color: #2563eb;

    font-size: 38px;
    font-weight: 700;
}


/* =========================================================
   MAIN TWO COLUMN GRID
   ========================================================= */

.qbc-generator-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(380px, 0.85fr);

    gap: 22px;

    width: 100%;
}


/* =========================================================
   PANEL
   ========================================================= */

.qbc-panel {
    min-width: 0;

    padding: 22px;

    background: #ffffff;

    border: 1px solid #e5e9f0;
    border-radius: 15px;
}


/* =========================================================
   PANEL TITLE
   ========================================================= */

.qbc-panel-title {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-bottom: 21px;
    padding-bottom: 14px;

    border-bottom: 2px solid #e5e9f0;
}

.qbc-panel-title-icon {
    width: 32px;
    height: 32px;

    flex: 0 0 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eef2ff;

    border-radius: 8px;

    color: #315ee8;

    font-size: 17px;
    font-weight: 700;
}

.qbc-panel-title h2 {
    margin: 0;

    color: #315ee8;

    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}


/* =========================================================
   FORM GROUP
   ========================================================= */

.qbc-form-group {
    width: 100%;
    margin-bottom: 20px;
}

.qbc-form-group > label {
    display: block;

    margin: 0 0 9px;

    color: #17233c;

    font-size: 15px;
    line-height: 1.35;
    font-weight: 650;
}

.qbc-form-group label .required {
    color: #ef4444;
    margin-left: 2px;
}


/* =========================================================
   INPUT WRAPPER
   ========================================================= */

.qbc-input-wrap {
    position: relative;

    width: 100%;
}

.qbc-input-icon {
    position: absolute;

    left: 11px;
    top: 50%;

    transform: translateY(-50%);

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f0f3ff;

    border-radius: 8px;

    color: #315ee8;

    font-size: 17px;

    z-index: 2;

    pointer-events: none;
}


/* =========================================================
   ALL INPUTS
   ========================================================= */

.qbc-generator input[type="text"],
.qbc-generator input[type="email"],
.qbc-generator input[type="url"],
.qbc-generator input[type="tel"],
.qbc-generator input[type="file"],
.qbc-generator select,
.qbc-generator textarea {
    width: 100%;

    min-height: 52px;

    margin: 0;
    padding: 13px 15px;

    border: 1px solid #d7dee9;
    border-radius: 9px;

    background: #ffffff;

    color: #17233c;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


/* =========================================================
   ICON INPUT
   ========================================================= */

.qbc-input-wrap input,
.qbc-input-wrap select {
    padding-left: 64px;
}


/* =========================================================
   TEXTAREA
   ========================================================= */

.qbc-generator textarea {
    min-height: 105px;

    resize: vertical;
}

.qbc-input-wrap textarea {
    padding-left: 64px;
    padding-top: 14px;
}


/* =========================================================
   PLACEHOLDER
   ========================================================= */

.qbc-generator input::placeholder,
.qbc-generator textarea::placeholder {
    color: #8b95a7;
    opacity: 1;
}


/* =========================================================
   FOCUS
   ========================================================= */

.qbc-generator input:focus,
.qbc-generator select:focus,
.qbc-generator textarea:focus {
    border-color: #4d6ff2;

    box-shadow:
        0 0 0 3px rgba(77, 111, 242, 0.11);

    background: #ffffff;
}


/* =========================================================
   PROFILE PHOTO
   ========================================================= */

.qbc-photo-upload {
    display: flex;
    align-items: center;

    gap: 16px;

    width: 100%;
}

.qbc-photo-preview-wrapper {
    width: 82px;
    height: 82px;

    flex: 0 0 82px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f0f3ff;

    border: 2px solid #dbe4ff;
    border-radius: 50%;

    color: #315ee8;
}

.qbc-photo-preview-wrapper img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

#qbc-photo-preview {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   FILE INPUT
   ========================================================= */

.qbc-generator input[type="file"] {
    min-height: 48px;

    padding: 8px;

    background: #fafbfc;

    cursor: pointer;
}

.qbc-generator input[type="file"]::file-selector-button {
    margin-right: 10px;

    padding: 8px 12px;

    border: 0;
    border-radius: 7px;

    background: #eef2ff;

    color: #315ee8;

    font-family: inherit;
    font-weight: 600;

    cursor: pointer;
}


/* =========================================================
   REMOVE PHOTO
   ========================================================= */

#qbc-remove-photo {
    margin-top: 7px;

    padding: 2px 0;

    border: 0;

    background: transparent;

    color: #ef4444;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

#qbc-remove-photo:hover {
    text-decoration: underline;
}


/* =========================================================
   HELP TEXT
   ========================================================= */

.qbc-help-text {
    margin: 6px 0 0;

    color: #8b95a7;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   PHONE SECTION
   ========================================================= */

#qbc-phone-container {
    width: 100%;
}

.qbc-phone-row {
    width: 100%;

    margin-bottom: 9px;
}

.qbc-phone-fields {
    display: grid;

    grid-template-columns:
        90px
        minmax(0, 1fr)
        140px
        42px;

    gap: 8px;

    width: 100%;
}


/* =========================================================
   PHONE COUNTRY
   ========================================================= */

.qbc-country-code {
    width: 100% !important;

    padding: 10px !important;

    min-width: 0;
}


/* =========================================================
   PHONE NUMBER
   ========================================================= */

.qbc-phone-number {
    width: 100% !important;

    min-width: 0;
}


/* =========================================================
   PHONE NAME
   ========================================================= */

.qbc-phone-label {
    width: 100% !important;

    min-width: 0;
}


/* =========================================================
   PHONE TYPE
   ========================================================= */

.qbc-phone-type {
    width: 100%;

    min-height: 52px;

    padding: 10px !important;
}


/* =========================================================
   REMOVE PHONE
   ========================================================= */

.qbc-remove-phone {
    width: 42px;
    height: 42px;

    align-self: center;

    padding: 0;

    border: 1px solid #f0d2d2;
    border-radius: 8px;

    background: #fff7f7;

    color: #ef4444;

    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    transition: 0.2s ease;
}

.qbc-remove-phone:hover {
    background: #fee2e2;
}


/* =========================================================
   ADD PHONE
   ========================================================= */

#qbc-add-phone {
    display: inline-flex;
    align-items: center;

    margin-top: 4px;
    padding: 5px 0;

    border: 0;

    background: transparent;

    color: #315ee8;

    font-family: inherit;
    font-size: 13px;
    font-weight: 650;

    cursor: pointer;
}

#qbc-add-phone:hover {
    text-decoration: underline;
}


/* =========================================================
   QR OPTIONS
   ========================================================= */

.qbc-qr-options {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;

    width: 100%;
}

.qbc-option {
    min-width: 0;
}

.qbc-option label {
    display: block;

    margin-bottom: 7px;

    color: #17233c;

    font-size: 13px;
    font-weight: 650;
}


/* =========================================================
   COLOR INPUT
   ========================================================= */

.qbc-generator input[type="color"] {
    width: 100%;
    height: 52px;

    min-height: 52px;

    padding: 4px;

    border: 1px solid #d7dee9;
    border-radius: 9px;

    background: #ffffff;

    cursor: pointer;
}


/* =========================================================
   QR SIZE
   ========================================================= */

#qbc-qr-size {
    width: 100%;
}


/* =========================================================
   GENERATE BUTTON
   ========================================================= */

.qbc-generate-btn {
    width: 100%;

    min-height: 54px;

    margin-top: 5px;
    padding: 13px 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 0;
    border-radius: 9px;

    background:
        linear-gradient(
            90deg,
            #7c3aed 0%,
            #2563eb 100%
        );

    color: #ffffff;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(55, 85, 220, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.qbc-generate-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(55, 85, 220, 0.27);
}

.qbc-generate-btn:active {
    transform: translateY(0);
}

.qbc-generate-btn:disabled {
    opacity: 0.65;

    cursor: wait;

    transform: none;
}


/* =========================================================
   RIGHT QR PREVIEW
   ========================================================= */

.qbc-qr-preview-box {
    width: 100%;

    min-height: 360px;

    padding: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border: 3px solid #2563eb;
    border-radius: 20px;
}

.qbc-qr-preview {
    width: 100%;

    min-height: 300px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}

#qbc-qr-preview canvas,
#qbc-qr-preview img {
    display: block;

    max-width: 100%;
    height: auto;

    margin: auto;
}


/* =========================================================
   QR PLACEHOLDER
   ========================================================= */

#qbc-qr-preview p {
    margin: 0;

    color: #8993a5;

    font-size: 14px;
}


/* =========================================================
   DOWNLOAD QR BUTTON
   ========================================================= */

.qbc-qr-actions {
    width: 100%;

    margin-top: 16px;
}

#qbc-download-qr {
    width: 100%;

    min-height: 50px;

    padding: 12px 18px;

    border: 1px solid #d7deeb;
    border-radius: 9px;

    background: #ffffff;

    color: #2563eb;

    font-family: inherit;
    font-size: 16px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#qbc-download-qr:hover {
    background: #f5f7ff;

    border-color: #2563eb;

    box-shadow:
        0 4px 12px rgba(37, 99, 235, 0.08);
}


/* =========================================================
   SCAN PREVIEW TITLE
   ========================================================= */

.qbc-scan-title {
    display: flex;
    align-items: center;

    gap: 10px;

    margin: 22px 0 14px;
    padding-top: 18px;

    border-top: 2px solid #edf0f5;
}

.qbc-scan-title span {
    color: #2563eb;

    font-size: 20px;
}

.qbc-scan-title h3 {
    margin: 0;

    color: #2563eb;

    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
}


/* =========================================================
   CONTACT PREVIEW
   ========================================================= */

#qbc-contact-preview-content {
    width: 100%;

    min-height: 180px;

    padding: 18px;

    background: #ffffff;

    border: 1px solid #e1e6ef;
    border-radius: 15px;

    box-shadow:
        0 2px 8px rgba(25, 45, 80, 0.06);
}


/* =========================================================
   CONTACT PREVIEW TYPOGRAPHY
   ========================================================= */

#qbc-contact-preview-content h4 {
    margin: 0 0 17px;

    color: #17233c;

    font-size: 20px;
    font-weight: 700;

    text-align: center;
}

#qbc-contact-preview-content p {
    margin: 0;

    padding: 8px 0;

    color: #17233c;

    font-size: 14px;
    line-height: 1.5;
}

#qbc-contact-preview-content strong {
    color: #17233c;
    font-weight: 700;
}


/* =========================================================
   CONTACT PREVIEW ICON BOXES
   ========================================================= */

#qbc-contact-preview-content .qbc-preview-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    background: #f0f3ff;

    border-radius: 8px;

    color: #315ee8;
}


/* =========================================================
   SAVE CONTACT
   ========================================================= */

.qbc-save-contact-wrapper {
    width: 100%;

    margin-top: 16px;
}

#qbc-save-contact {
    width: 100%;

    min-height: 50px;

    margin-top: 0;

    background:
        linear-gradient(
            90deg,
            #2563eb 0%,
            #2563eb 100%
        );

    box-shadow:
        0 7px 18px rgba(37, 99, 235, 0.18);
}

#qbc-save-contact:hover {
    background:
        linear-gradient(
            90deg,
            #1d4ed8 0%,
            #2563eb 100%
        );
}


/* =========================================================
   PROFILE LINK
   ========================================================= */

#qbc-profile-link {
    width: 100%;

    margin-top: 14px;
    padding: 13px 15px;

    background: #eff6ff;

    border: 1px solid #bfdbfe;
    border-radius: 9px;

    text-align: center;

    word-break: break-word;
}

#qbc-profile-link p {
    margin: 0 0 5px;

    color: #1d4ed8;

    font-size: 13px;
}

#qbc-profile-link a {
    color: #2563eb;

    font-size: 13px;

    text-decoration: none;
}

#qbc-profile-link a:hover {
    text-decoration: underline;
}


/* =========================================================
   NOTE
   ========================================================= */

.qbc-note {
    width: 100%;

    margin-top: 22px;
    padding: 14px 17px;

    background: #eff6ff;

    border: 1px solid #bfdbfe;
    border-radius: 9px;

    color: #1d4ed8;

    font-size: 13px;
    line-height: 1.55;
}

.qbc-note strong {
    font-weight: 700;
}


/* =========================================================
   SUCCESS
   ========================================================= */

.qbc-success {
    width: 100%;

    margin: 15px 0;
    padding: 13px 16px;

    background: #ecfdf5;

    border: 1px solid #a7f3d0;
    border-radius: 9px;

    color: #047857;

    font-size: 14px;
}


/* =========================================================
   ERROR
   ========================================================= */

.qbc-error {
    width: 100%;

    margin: 15px 0;
    padding: 13px 16px;

    background: #fef2f2;

    border: 1px solid #fecaca;
    border-radius: 9px;

    color: #b91c1c;

    font-size: 14px;
}


/* =========================================================
   HIDDEN UTILITY
   ========================================================= */

.qbc-hidden {
    display: none !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .qbc-generator-grid {
        grid-template-columns: 1fr;
    }

    .qbc-qr-preview-box {
        min-height: 350px;
    }

}


/* =========================================================
   TABLET / SMALL LAPTOP
   ========================================================= */

@media (max-width: 760px) {

    .qbc-main-card {
        padding: 22px;
    }

    .qbc-generator-header {
        margin-bottom: 22px;
    }

    .qbc-header-content h1 {
        font-size: 31px;
    }

    .qbc-qr-options {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .qbc-phone-fields {
        grid-template-columns:
            85px
            minmax(0, 1fr)
            130px
            42px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .qbc-generator {
        margin: 15px auto;

        padding: 0 10px;
    }

    .qbc-main-card {
        padding: 15px;

        border-radius: 14px;
    }


    /* Header */

    .qbc-generator-header {
        align-items: flex-start;

        gap: 12px;

        margin-bottom: 20px;
    }

    .qbc-header-content h1 {
        font-size: 27px;

        letter-spacing: -0.5px;
    }

    .qbc-header-content p {
        font-size: 14px;
    }

    .qbc-header-icon {
        width: 54px;
        height: 54px;

        flex: 0 0 54px;

        font-size: 27px;
    }


    /* Panel */

    .qbc-panel {
        padding: 16px;

        border-radius: 13px;
    }

    .qbc-panel-title {
        margin-bottom: 18px;
    }

    .qbc-panel-title h2 {
        font-size: 18px;
    }


    /* QR options */

    .qbc-qr-options {
        grid-template-columns: 1fr;
    }


    /* Phone */

    .qbc-phone-fields {
        grid-template-columns:
            78px
            minmax(0, 1fr);
    }

    .qbc-phone-number {
        min-width: 0;
    }

    .qbc-phone-label {
        grid-column: 1 / -1;
    }

    .qbc-phone-type {
        grid-column: 1 / 2;
    }

    .qbc-remove-phone {
        grid-column: 2 / 3;

        justify-self: end;
    }


    /* QR */

    .qbc-qr-preview-box {
        min-height: 285px;

        padding: 14px;

        border-radius: 17px;
    }

    .qbc-qr-preview {
        min-height: 245px;
    }


    /* Note */

    .qbc-note {
        font-size: 12px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .qbc-generator {
        padding: 0 7px;
    }

    .qbc-main-card {
        padding: 11px;
    }

    .qbc-panel {
        padding: 13px;
    }

    .qbc-header-icon {
        display: none;
    }

    .qbc-header-content h1 {
        font-size: 24px;
    }

    .qbc-header-content p {
        font-size: 13px;
    }

    .qbc-phone-fields {
        grid-template-columns:
            72px
            minmax(0, 1fr);
    }

    .qbc-generator input[type="text"],
    .qbc-generator input[type="email"],
    .qbc-generator input[type="url"],
    .qbc-generator input[type="tel"],
    .qbc-generator select,
    .qbc-generator textarea {
        font-size: 14px;
    }

}


/* =========================================================
   WORDPRESS THEME OVERRIDE
   Prevent theme styles from breaking plugin
   ========================================================= */

.qbc-generator button,
.qbc-generator input,
.qbc-generator select,
.qbc-generator textarea {
    font-family: inherit;
}

.qbc-generator button {
    line-height: normal;
}

.qbc-generator img {
    max-width: 100%;
}

.qbc-generator a {
    box-shadow: none;
}

.qbc-generator form {
    margin: 0;
}

.qbc-generator h1,
.qbc-generator h2,
.qbc-generator h3,
.qbc-generator h4,
.qbc-generator p {
    max-width: none;
}


/* =========================================================
   END
   ========================================================= */