#photolab-app {
    max-width: 800px;
    margin: 0 auto;
}

.photolab-section {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.photolab-section > * {
    width: 100%;
    max-width: 800px;
}

.photolab-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    text-align: left;
    width: 100%;
    max-width: 800px;
}

.photolab-field span {
    font-weight: 600;
    margin-bottom: 4px;
}

.photolab-textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.photolab-field input[data-field="last_name"],
.photolab-field input[data-field="email"] {
    height: 40px;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    padding: 0 12px;
}

.photolab-pickups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.photolab-pickup-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    flex: 1 1 0;
    justify-content: center;
}

.photolab-pickup-option input {
    margin: 0;
}
.photolab-pickup-option span {
    text-align: center;
}

.photolab-upload-controls {
    display: flex;
    justify-content: center;
}

.photolab-dropzone {
    flex: 1;
    padding: 20px;
    border: 2px dashed #bbb;
    text-align: center;
    border-radius: 6px;
    transition: border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 800px;
}

.photolab-dropzone p {
    margin: 0;
}

.photolab-dropzone.is-dragover {
    border-color: #2171b1;
}

.photolab-file-input {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #2171b1;
    font-weight: 600;
}

.photolab-file-input input {
    display: none;
}

.photolab-upload-defaults {
    width: 100%;
    text-align: left;
}

.photolab-upload-defaults-heading {
    text-align: center;
    font-weight: 300;
    margin: 0 0 8px;
    font-size: 16px;
    color: #2c343b;
    text-transform: none;
    letter-spacing: normal;
}

.photolab-upload-defaults-row {
    display: flex;
    flex-wrap: wrap;
    row-gap: 5px;
    column-gap: 0;
    margin-top: 10px;
}

.photolab-upload-defaults-row .photolab-tile-field {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
    min-width: 0;
    margin: 0 5px;
}

.photolab-upload-defaults-note {
    margin-top: 10px;
    font-size: 0.75em;
    color: #555;
    text-align: center;
}

.photolab-dropzone .photolab-upload-defaults-note {
    margin-top: 10px;
}

.photolab-items {
    display: grid;
    gap: 16px;
    width: 100%;
    text-align: left;
    grid-template-columns: 1fr;
}

@media (min-width: 800px) {
    .photolab-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.photolab-tile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 6px;
    text-align: left;
}

.photolab-tile-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    height: 100%;
}

.photolab-thumb-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 0 0 200px;
    max-width: 200px;
    height: 100%;
}

@media (max-width: 500px) {
    .has-global-padding {
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .photolab-thumb-column {
        flex: 0 0 150px;
        max-width: 150px;
    }
}

.photolab-thumb {
    width: 100%;
    height: 100%;
    position: relative;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

.photolab-thumb-overlay {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
}

.photolab-thumb-overlay-top {
    top: 0;
}

.photolab-thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.photolab-thumb-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.photolab-thumb-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.photolab-thumb-actions .button {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.photolab-thumb-actions-top,
.photolab-thumb-actions-bottom {
    display: flex;
    justify-content: center;
    flex-direction: row;
}

.photolab-thumb-actions-top {
    margin-bottom: 0;
    height: 100%;
}

.photolab-thumb-actions-bottom {
    margin-top: 0;
}

.photolab-submit-note {
    font-size: 0.75em;
    color: #555;
    text-align: center;
    margin-top: 10px;
}

.photolab-submit .button {
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 5px;
    border: none;
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
}

.photolab-submit .button:not([disabled]) {
    background-color: #2e8b57;
    color: #fff;
}

.photolab-submit .button:not([disabled]):hover,
.photolab-submit .button:not([disabled]):focus-visible {
    background-color: #267047;
    color: #fff;
}

.photolab-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    font-size: 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.photolab-progress-error {
    font-weight: 600;
}

.photolab-thumb-action.photolab-thumb-crop,
.photolab-progress-remove {
    background: transparent;
    border: none;
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-weight: 600;
}

.photolab-thumb-action.photolab-thumb-crop:hover,
.photolab-thumb-action.photolab-thumb-crop:focus-visible,
.photolab-progress-remove:hover,
.photolab-progress-remove:focus-visible {
    opacity: 0.9;
}

.photolab-tile-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photolab-tile-fields.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.photolab-tile-field {
    display: flex;
    width: 100%;
}

.photolab-tile-field select,
.photolab-tile-field input {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.photolab-tile-field select {
    padding: 0 12px;
}

.photolab-tile-field input {
    padding: 0;
    border-width: 1px;
    text-align: center;
}

.photolab-multiselect {
    position: relative;
    width: 100%;
}

.photolab-multiselect-toggle {
    width: 100%;
    min-height: 40px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    text-align: left;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.photolab-multiselect-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #555;
}

.photolab-multiselect.is-open .photolab-multiselect-toggle::after {
    transform: rotate(180deg);
}

.photolab-multiselect-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 8px;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.photolab-multiselect.has-value .photolab-multiselect-toggle {
    border-color: #2171b1;
}

.photolab-multiselect.is-open .photolab-multiselect-menu {
    display: block;
}

.photolab-multiselect-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
}

.photolab-multiselect-option input {
    margin: 0;
    width: auto;
    height: 20px;
}

.photolab-qty-field {
    display: flex;
    align-items: stretch;
}

.photolab-qty-field input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.photolab-field-suffix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-left: 0;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    height: 40px;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 13px;
}

.photolab-tile-alerts-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8em;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.photolab-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    text-align: left;
}

.photolab-min-order-note {
    font-size: 0.75em;
    color: #555;
    text-align: center;
    margin-top: 0;
}

.photolab-alert {
    color: #d63638;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.photolab-alert-warning {
    margin: 0;
    text-align: center;
    width: 100%;
}

.photolab-error {
    color: #d63638;
    margin-top: 8px;
}

.photolab-success {
    color: #007017;
    margin-top: 8px;
}

.photolab-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.photolab-modal-content {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photolab-modal-body {
    flex: 1;
    overflow: auto;
}

.photolab-modal-body img {
    max-width: 100%;
}

.photolab-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
