.kis-selectable {
	position: relative;
}

/* Image cursor shows it's clickable for lightbox */
.kis-lightbox-trigger {
	cursor: pointer;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Override any pointer-events: none from theme CSS */
	pointer-events: auto !important;
}

/* Custom selection indicator */
.kis-selection-indicator {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 22px;
	height: 22px;
	cursor: pointer;
	background-color: transparent;
	border: 2px solid white;
	border-radius: 50%;
	z-index: 10;
}

.kis-selection-indicator.selected {
	background-color: green;
}

.kis-selection-indicator.selected::after {
	content: "✓";
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 14px;
	font-weight: bold;
}

/* PhotoSwipe lightbox selection indicator */
.kis-pswp-selection-indicator {
	position: absolute;
	bottom: 20px;
	right: 20px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: transparent;
	border: 2px solid white;
	z-index: 1900; /* Above PhotoSwipe UI */
	cursor: pointer;
}

.kis-pswp-selection-indicator.selected {
	background-color: #4CAF50;
	border-color: white;
}

.kis-pswp-selection-indicator.selected::after {
	content: '\2713'; /* Checkmark symbol */
	color: white;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-weight: bold;
}

/* Ensure images maintain aspect ratio and are centered */
.pswp__img {
	object-fit: contain;
}

#kis-selection-btn {
	position: fixed;
	bottom: 30px;
	right: 30px;
	background: black;
	color: white;
	padding: 12px 18px;
	border-radius: 6px;
	cursor: pointer;
	z-index: 9999;
}

#kis-popup-form {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgb(41, 41, 41);
	color: #ccc;
	padding: 20px;
	border: 1px solid #a8a8a8;
	outline: none;
	z-index: 10000;
}

#kis-overlay {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(41, 41, 41, 0.8);
	z-index: 9998;
}

#kis-close-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	cursor: pointer;
}

#kis-spinner {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #aaa;
    font-family: Arial, sans-serif;
}

#kis-confirmation-message {
    color: #7be67b;
    text-align: center;
    margin-top: 10px;
    font-family: Arial, sans-serif;
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

#kis-selection-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #232323;
    color: #ccc;
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 9999;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    border: 1px solid #444;
    /*box-shadow: 0 4px 18px rgba(0,0,0,0.25);*/
    transition: background 0.2s, color 0.2s, border 0.2s;
	z-index: 10000;
}

#kis-contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kis-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.kis-form-field {
    margin-bottom: 10px;
}

#kis-send-step p {
    color: #ccc;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.kis-form-field label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.kis-form-field input,
.kis-form-field textarea {
    width: 100%;
    padding: 8px;
    background-color: #232323 !important;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
}

.kis-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

#kis-contact-form button[type="submit"] {
    padding: 8px 22px;
    background: #232323;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 6px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
    margin-bottom: 0;
    display: inline-block;
}

/* AND/OR search relation radio buttons */
#media-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    position: static;
    background: rgb(41, 41, 41);
    color: #ccc;
}

/* Remove .media-search-sticky-wrap styles if present */
.media-search-sticky-wrap {
    position: static;
    max-width: none;
    margin: 0;
}


.media-search-sticky-wrap {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    /* Ensure no overflow property here! */
}


.media-search-input-group {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1 1 0%;
    min-width: 360px;
    max-width: 100%;
}
#media-search-input {
    width: 100%;
    min-width: 340px;
    flex: 1 1 0%;
    max-width: 100%;
    padding-right: 28px;
    box-sizing: border-box;
}
#media-search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #bbb;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    z-index: 1;
}

#media-search-form label {
    margin: 0 2px 0 0;
    cursor: pointer;
    color: #bbb;
    font-size: 14px;
    font-family: 'Source Sans Pro', Arial, sans-serif;
}
#media-search-form input[type="radio"] {
    accent-color: #444;
    margin-right: 2px;
    vertical-align: middle;
}
#media-search-form > div[style*="flex"] {
    margin-left: 10px;
}

/* Reduce vertical space above the search bar */
.tb_text_wrap > h2,
.tb_text_wrap > p {
    margin-bottom: 8px !important;
}
#media-search-form {
    margin-top: 10px !important;
}
.tb_text_wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* --- Review Step Styles --- */
#kis-review-step {
    min-width: 350px;
}
.kis-review-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 18px 0 16px 0;
    justify-content: flex-start;
}
.kis-review-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #444;
    background: #232323;
    box-shadow: 0 2px 10px rgba(0,0,0,0.24);
    transition: border 0.2s;
}
.kis-review-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.kis-thumb-remove {
    position: absolute;
    bottom: 7px;
    right: 7px;
    width: 22px;
    height: 22px;
    background: #b30000;
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    line-height: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    pointer-events: none;
    z-index: 2;
}
.kis-review-thumb:hover {
    border: 2px solid #b30000;
}
.kis-review-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    gap: 12px;
}
#kis-back-to-grid, #kis-proceed-to-send {
    padding: 8px 18px;
    background: #232323;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 6px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
#kis-proceed-to-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#kis-contact-form button[type="submit"]:hover {
    background: #333;
    color: #fff;
    border: 1.5px solid #888;
}