/* =============================================
   QR Code 1 - Plugin Styles
   Inherits theme fonts; self-contained layout.
   ============================================= */

/* Wrapper Card */
#qr-code-1-generator-wrapper {
    max-width: 500px;
    margin: 2em auto;
    padding: 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
    font-family: inherit; /* Inherit theme font */
    color: inherit;
    background: #fff;
}

/* Heading */
#qr-code-1-generator-wrapper h2 {
    margin: 0 0 1.2em 0;
    padding: 0;
    font-size: 1.6em;
    font-weight: 700;
    color: #1a2a42;
    line-height: 1.3;
}

/* Form Groups */
#qr-code-1-generator-wrapper .qr1-form-group {
    margin-bottom: 1.4em;
}

#qr-code-1-generator-wrapper label {
    display: block;
    margin-bottom: 0.4em;
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
}

/* URL Input */
#qr-code-1-generator-wrapper input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
}

#qr-code-1-generator-wrapper input[type="url"]:hover {
    border-color: #999;
}

/* Color Picker Row */
.qr1-color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

#qr-code-1-generator-wrapper input[type="color"] {
    width: 44px;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    margin: 0;
    padding: 3px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    vertical-align: middle;
}

#qr-code-1-generator-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

#qr-code-1-generator-wrapper input[type="color"]::-webkit-color-swatch {
    border: 1px solid #ddd;
    border-radius: 2px;
}

#qr-code-1-generator-wrapper input[type="color"]::-moz-color-swatch {
    border: 1px solid #ddd;
    border-radius: 2px;
}

.qr1-color-hex {
    width: 100px;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95em;
    line-height: 36px;
    color: #333;
    box-sizing: border-box;
    vertical-align: middle;
}

/* Accessibility: Focus Styles */
#qr-code-1-generator-wrapper input:focus,
#qr-code-1-generator-wrapper button:focus,
#qr-code-1-generator-wrapper a:focus {
    outline: 3px solid #4A90D9;
    outline-offset: 2px;
}

/* Buttons */
.qr1-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 0.5em;
}

.qr1-btn {
    display: inline-block;
    text-decoration: none;
    font-size: 0.95em;
    font-family: inherit;
    font-weight: 600;
    line-height: 1;
    padding: 12px 22px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    transition: background-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.qr1-btn-primary {
    background: #2271b1 !important;
    color: #ffffff !important;
}

.qr1-btn-primary:hover,
.qr1-btn-primary:focus {
    background: #135e96 !important;
    color: #ffffff !important;
}

.qr1-btn-primary:active {
    background: #0a4b78;
}

/* QR Code Result */
#qr-code-1-result {
    margin-top: 1.5em;
    text-align: center;
    padding: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    display: none; /* hidden when empty */
}

#qr-code-1-result:not(:empty) {
    display: block;
}

#qr-code-1-result canvas,
#qr-code-1-result img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Download Options */
#qr-code-1-download-options {
    text-align: center;
    margin-top: 1.2em;
}

/* Message Styles */
#qr-code-1-message {
    margin-top: 1.2em;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 0.95em;
    display: none;
}

#qr-code-1-message.error {
    background-color: #fce4e4;
    color: #a94442;
    border: 1px solid #f5c6cb;
    display: block;
}

#qr-code-1-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}

/* Responsive Design */
@media (max-width: 600px) {
    #qr-code-1-generator-wrapper {
        padding: 24px 18px;
        margin: 1em;
        max-width: 100%;
    }

    .qr1-buttons {
        flex-direction: column;
    }

    .qr1-btn {
        width: 100%;
    }
}