/* =============================================================================
   InvoicePlane
   Custom Stylesheet

   All changes made in this file will override the default styles.
   ========================================================================== */
/* Phones: keep each item card short enough to fill in without endless scrolling */
@media (max-width: 767px) {
    div#item_table textarea {
        height: 4.8rem;
    }

    div#item_table .details-box .input-group {
        margin-bottom: 4px;
    }

    /* 16px stops iOS Safari from zooming in when a field is tapped */
    #content input.form-control,
    #content select.form-control,
    #content textarea.form-control {
        font-size: 16px;
    }
}

/* Photos: full-size viewer and tappable thumbnails */
.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(0, 0, 0, .9);
    cursor: zoom-out;
}

.photo-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#previews .dz-success img[data-dz-thumbnail],
.photo-grid img {
    cursor: zoom-in;
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.photo-grid img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.camera-button {
    margin-right: 4px;
}

/* Attachment thumbnails: crop to the square instead of stretching landscape photos */
#actions #previews img[data-dz-thumbnail] {
    object-fit: cover;
    border-radius: 4px;
}
