/* ==========================================================================
   QR Code Generator Stylesheet - ชัยพฤกษ์เกษตร
   ========================================================================== */

/* Global Reset & Base Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Sarabun", sans-serif;
    background-color: #f9fafb;
    color: #374151;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

/* Core Form Frame Holder */
.qr-master-wrapper {
    max-width: 28rem;
    /* 448px (max-w-md) */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Top Back Actions Link */
.top-actions {
    display: flex;
    justify-content: flex-start;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #16a34a;
}

/* Master Core App Card Box */
.qr-generator-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
}

.app-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin-bottom: 0.5rem;
}

.app-sub-description {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Form Entries Control Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1rem;
    outline: none;
    background-color: #ffffff;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.input-control:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15), inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* Live View Output Screen */
.qr-monitor-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 256px;
    background-color: #f3f4f6;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Rendered Canvas/Image Holder from JS */
.qrcode-output {
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.qrcode-output img {
    display: block;
}

/* Empty Placeholder Content Display */
.monitor-placeholder {
    color: #9ca3af;
    text-align: center;
}

.monitor-placeholder .title {
    font-size: 1.125rem;
    font-weight: 500;
}

.monitor-placeholder .subtitle {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Bottom Action Downloads Matrix Buttons */
.download-actions-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.btn-download {
    width: 100%;
    color: #ffffff;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
}

.btn-download-png {
    background-color: #16a34a;
}

.btn-download-png:hover {
    background-color: #15803d;
}

.btn-download-jpg {
    background-color: #059669;
}

.btn-download-jpg:hover {
    background-color: #047857;
}