.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: dotted #b70e13;
    border-radius: 10px;
    box-sizing: border-box;
}

.starting-fee-info {
    background-color: #f8f4e5;
    border: 1px solid #e0d5b0;
    border-left: 4px solid #B70E13;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 3px;
    font-size: 15px;
    color: #333;
}

.starting-fee-info strong {
    color: #B70E13;
}

.upload-btn-container {
    text-align: center;
    margin: 24px 0;
}

.button-single,
.add-to-cart-btn {
    padding: 8px 16px;
    background-color: #B70E13;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kaleko205Round', Arial, sans-serif;
    font-size: 14px;
}

.button-single:hover,
.add-to-cart-btn:hover {
    background-color: #960b0f;
}

.image-carousel {
    margin-bottom: 10px;
}

.canvas-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
}

.canvas-wrapper {
    width: 100%;
    position: relative;
}

#mainCanvas {
    display: block;
    width: 100%;
    height: auto;
}

/* Små fyrkantiga knappar direkt under förhandsvisningen – som foto/tackkort */
.image-adjust-toolbar {
    max-width: 400px;
    margin: 10px auto 0;
}

.image-adjust-toolbar.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.image-control-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2px;
    margin: 8px 0 0;
}

.image-control-grid button {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #B70E13;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kaleko205Round', Arial, sans-serif;
    font-size: clamp(0.68rem, 2.1vw, 0.82rem);
    font-weight: 500;
    line-height: 1;
    transition: background-color 0.2s;
}

.image-control-grid button:hover:not(:disabled) {
    background-color: #960b0f;
}

.image-control-grid button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.panel-toggle-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 8px auto 0;
    padding: 6px 10px;
    background-color: #B70E13;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kaleko205Round', Arial, sans-serif;
    font-size: 14px;
}

.panel-toggle-btn:hover:not(:disabled) {
    background-color: #960b0f;
}

.panel-toggle-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.panel-toggle-btn.active {
    background-color: #333;
}

.color-adjust-panel {
    max-width: 400px;
    margin: 8px auto 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.color-adjust-panel.hidden {
    display: none;
}

.margin-color-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.margin-color-row label {
    font-size: 13px;
}

.margin-color-row input[type="color"] {
    width: 48px;
    height: 32px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}

.filter-toggle-row {
    margin-top: 0;
    margin-bottom: 8px;
}

.filter-toggle-row button {
    width: auto;
    min-width: 30px;
    padding: 0 10px;
    font-size: clamp(0.62rem, 2vw, 0.75rem);
}

.image-control-grid button.active {
    background-color: #333;
}

.image-control-grid button.active:hover:not(:disabled) {
    background-color: #222;
}

.compact-sliders {
    margin-top: 6px;
    padding: 0 2px;
}

.compact-sliders label {
    display: block;
    font-size: 13px;
    margin: 8px 0 2px;
}

.compact-sliders input[type="range"] {
    width: 100%;
    margin: 0 0 4px;
}

.carousel-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 15px auto;
    max-width: 400px;
}

.carousel-nav button {
    flex: 1;
    padding: 5px;
    background-color: #B70E13;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kaleko205Round', Arial, sans-serif;
    font-size: 14px;
}

.carousel-nav button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.size-selection {
    margin: 20px 0;
}

.preview-size-selection {
    max-width: 400px;
    margin: 12px auto 4px;
}

.size-dropdown-container {
    margin: 10px 0;
}

.size-dropdown {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Kaleko205Round', Arial, sans-serif;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
}

.size-dropdown:focus {
    outline: none;
    border-color: #B70E13;
    box-shadow: 0 0 5px rgba(183, 14, 19, 0.3);
}

.copies-selection {
    margin: 15px 0;
}

.copies-selection label {
    font-weight: bold;
    margin-right: 8px;
}

.copies-selection input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.copies-hint {
    margin-left: 10px;
    color: #666;
    font-size: 14px;
}

/* Knappgrupp som foto */
.button-group {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0;
}

.button-group button {
    flex: 1;
    margin-top: 5px;
    padding: 5px;
    background-color: #B70E13;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kaleko205Round', Arial, sans-serif;
    font-size: 14px;
}

.button-group button:hover {
    background-color: #960b0f;
}

.toggle-image-btn.exclude,
.reset-session-btn {
    background-color: #666;
}

.reset-session-btn {
    background-color: #444;
}

.toggle-image-btn.exclude:hover {
    background-color: #555;
}

.reset-session-btn:hover {
    background-color: #333;
}

/* Modal */
.polaroid-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.polaroid-modal.hidden {
    display: none;
}

body.modal-open {
    overflow: hidden;
}

.polaroid-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.polaroid-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.polaroid-modal-content h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: #B70E13;
}

.modal-hint {
    margin: 0 0 14px;
    font-size: 14px;
    color: #555;
}

.text-modal-preview-wrap {
    margin: 0 0 14px;
    padding: 8px;
    background: #f0f0f0;
    border-radius: 6px;
    text-align: center;
}

#textModalPreview {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.text-modal-controls {
    margin: 8px 0 0;
}

.polaroid-modal-content .filter-toggle-row {
    margin-top: 4px;
    margin-bottom: 0;
}

.adjustment-sliders label {
    display: block;
    margin: 8px 0 4px;
    font-size: 14px;
}

.adjustment-sliders input[type="range"] {
    width: 100%;
    margin-bottom: 4px;
}

#polaroidText {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Kaleko205Round', Arial, sans-serif;
    font-size: 15px;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.text-style-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.text-style-row label {
    font-size: 14px;
}

.text-style-row select {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#textColorPicker {
    width: 40px;
    height: 30px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}

.modal-actions {
    margin-top: 12px;
}

.modal-actions .panel-toggle-btn {
    margin: 0;
}

.price-summary {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.starting-fee {
    font-weight: bold;
    background: #f5f5f5;
}

.price-total {
    font-weight: bold;
    border-top: 2px solid #ddd;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
}

.price-value.discount {
    color: #28a745;
}

.thumbnail-container {
    text-align: center;
    margin-top: 20px;
    font-size: 0;
}

.thumbnail-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    vertical-align: top;
}

.thumbnail-inner-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail {
    border: 2px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
}

.thumbnail.active {
    border-color: #B70E13;
}

.thumbnail.excluded {
    opacity: 0.5;
}

.thumbnail canvas,
.thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
}

.thumbnail-size {
    font-size: 12px;
    margin-top: 4px;
}

.action-buttons {
    text-align: center;
    margin-top: 20px;
}

.loading-indicator {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.loading-indicator span {
    background: #fff;
    color: #B70E13;
    padding: 15px 20px;
    border-radius: 5px;
    font-weight: bold;
}

@media (max-width: 600px) {
    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }

    .size-dropdown-container {
        flex-direction: column;
        align-items: stretch;
    }

    .carousel-nav {
        flex-direction: column;
    }
}
