/* ── galleryonetournament Extension – Frontend CSS ─────────────────────────── */

/* ── Shared ─────────────────────────────────── */
.fpx-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ccc !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    background: #f9f9f9 !important;
    color: #333 !important;
    transition: background .2s;
    text-decoration: none;
    line-height: 1.4;
    box-shadow: none;
}
.fpx-btn:hover { background: #e0e0e0 !important; color: #111 !important; }
.fpx-btn-primary { background: #34EB70 !important; color: #fff !important; border-color: #3eba70 !important; }
.fpx-btn-primary:hover { background: #3eba70 !important; color: #fff !important; }
.fpx-btn-danger { background: #d63638 !important; color: #fff !important; border-color: #b32d2e !important; }
.fpx-btn-danger:hover { background: #b32d2e !important; color: #fff !important; }
/* Edit button — grey with clear border so it's always visible */
.fpx-btn-edit { background: #34EB70 !important; color: #fff !important; border-color: #3eba70 !important; }
.fpx-btn-edit:hover { background: #3eba70 !important; color: #fff !important; }
.fpx-btn-sm { padding: 4px 10px !important; font-size: 12px; }
.fpx-input { width: 100%; padding: 8px; border: 1px solid #ddd !important; border-radius: 4px; box-sizing: border-box; margin-bottom: 8px; font-size: 14px; color: #333 !important; background: #fff !important; }
.fpx-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 20px; margin-bottom: 20px; color: #333; }
.fpx-my-photos-wrap .fpx-card{
    padding: 0;
    border: 0;
    width: 41%;
    margin: 0;
}
.fpx-my-photos-wrap .fpx-card .fpx-form-row{
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.fpx-my-photos-wrap .fpx-card .fpx-form-row label{
    width: 100%;
}

.fpx-my-photos-wrap .fpx-card .fpx-form-row .fpx-input{
    width: 250px;
    margin: 0;
}

.fpx-form-row { display: flex; flex-direction: column; gap: 8px; }
.fpx-msg { display: none; padding: 10px; border-radius: 4px; margin-top: 8px; }
.fpx-msg.fpx-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
.fpx-msg.fpx-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

/* ── My Albums ──────────────────────────────── */
.fpx-my-albums-wrap { color: #333 !important; }
.fpx-my-albums-wrap h2, .fpx-my-albums-wrap h3 { color: #222 !important; font-size: 22px; margin-bottom: 16px; }
.fpx-album-tree { margin-top: 20px; }
.fpx-album-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px !important;
    border-bottom: 1px solid #f0f0f0;
    background: #fff !important;
    border-radius: 4px;
    margin-bottom: 4px;
    color: #333 !important;
}
.fpx-album-row:hover { background: #f7f7f7 !important; }
.fpx-album-row-name { font-size:18px; font-weight: 500; color: #222 !important; }
.fpx-album-row-actions { display: flex; gap: 6px; }
.fpx-photo-picker { display: flex; flex-direction: column; gap: 7px; margin: 2px 0 8px; }
.fpx-photo-picker-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fpx-field-label, .fpx-auth-form label { font-weight: 600; color: #333; }
.fpx-photo-selection-count { color: #666; font-size: 13px; }

/* Modal */
.fpx-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.fpx-modal-inner {
    position: relative; background: #fff; border-radius: 8px; padding: 30px;
    max-width: 480px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.fpx-modal-inner h3 { margin-top: 0; }
.fpx-modal-actions { display: flex; gap: 10px; margin-top: 12px; }
.fpx-modal-close {
    position: absolute; top: 8px; right: 12px; padding: 0;
    border: 0; background: transparent !important; color: #555 !important;
    font-size: 30px; line-height: 1; cursor: pointer;
}
.fpx-modal-close:hover { color: #111 !important; }

.fpx-photo-pagination .fpx-btn{
    background: transparent !important;
    color: #000 !important;
    border: 0 !important;
    border-bottom: 2px solid #34eb70 !important;
    border-radius: 0;
    transition:all 0.3s ease-in-out;
}

.fpx-photo-pagination .fpx-btn.fpx-btn-primary{
    background: #34eb704f !important;
}

.fpx-photo-pagination .fpx-btn:hover{
    background: #34eb704f !important;
}

.fpx-no-albums p { margin-top: 0; color: #555; }

/* Photographer registration/login */
.fpx-auth-wrap { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.fpx-auth-wrap h2 { color: #222; margin-top: 0; }
.fpx-auth-form { display: flex; flex-direction: column; gap: 6px; }
.fpx-auth-form .fpx-input { margin-bottom: 6px; }
.fpx-auth-form .fpx-btn { align-self: flex-start; margin-top: 8px; }
.fpx-auth-remember { display: flex; align-items: center; gap: 7px; font-weight: 400 !important; }
.fpx-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* ── My Photos ──────────────────────────────── */
.fpx-my-photos-wrap { 
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 15px;
    color: #333 !important;
    }
.fpx-my-photos-wrap h2 { width: 100%; font-size: 22px; margin-bottom: 16px; color: #222 !important; }
.fpx-admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 16px;
    margin-top: 16px;
}
.fpx-admin-photo-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    display: flex;
    background: #fafafa;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.fpx-admin-photo-item img {
        width: 100%;
    height: 130px;
    max-height: 140px;
    object-fit: cover;
    border-radius: 4px;
    min-height: 140px;
     }
.fpx-admin-photo-item p { font-size: 12px; margin: 6px 0 4px; word-break: break-all; color: #555 !important; }
.fpx-photo-processing { margin-top: 8px; text-align: center; }
.fpx-progress-label { margin-bottom: 5px; color: #555; font-size: 12px; }
.fpx-progress-percent { font-weight: 600; }
.fpx-progress-bar { width: 100%; height: 7px; overflow: hidden; background: #e5e5e5; border-radius: 999px; }
.fpx-progress-bar span {
    display: block; width: 0; height: 100%;
    background: #2ee36d; border-radius: inherit;
    transition: width .3s ease;
}

/* ── Public Gallery ─────────────────────────── */
/* Ensure all public gallery text is visible regardless of theme */
.fpx-album-grid,
.fpx-photo-grid,
.fpx-breadcrumb,
.fpx-album-title,
.fpx-photo-count-label,
.fpx-album-info { color: #333 !important; }
.fpx-album-info h3, .fpx-album-info h3 a { color: #ef3f09 !important; text-decoration: none !important; font-weight: 600; }
.fpx-album-info h3 a:hover { color: #34EB70 !important; }
.fpx-sub-count, .fpx-photo-count { color: #888 !important; }
.fpx-empty { color: #999 !important; }

.fpx-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.fpx-album-card { border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: box-shadow .2s; }
.fpx-album-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.fpx-album-card img { width: 100%; height: 200px !important; object-fit: cover; display: block; }
.fpx-album-no-thumb { display: flex; align-items: center; justify-content: center; height: 170px; background: #f0f0f0; text-decoration: none; color: #555; font-weight: 600; }
.fpx-album-info { padding: 12px; }
.fpx-album-info h3 { margin: 0 0 4px; font-size: 15px; }
.fpx-album-info h3 a { text-decoration: none; color: inherit; }
.fpx-sub-count, .fpx-photo-count { font-size: 12px; color: #888; margin-right: 8px; text-transform: uppercase; letter-spacing: .5px; }

/* Album photos grid – reference style: tight 4-col grid, no gap */
.fpx-album-title { font-size: 24px; text-transform: uppercase; margin-bottom: 4px; font-weight: 700; color: #222; }
.fpx-photo-count-label { color: #888; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }

.fpx-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 0 30px; 
}
.fpx-photo-item {
    position: relative;
    background: #fff;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.fpx-photo-thumb-wrap {
    position: relative;
    width: 100%; height: 100% !important;
    overflow: hidden;
    cursor: pointer;
}
.fpx-photo-thumb-wrap img {
    width: 100%; height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.fpx-photo-thumb-wrap:hover img { transform: scale(1.05); }

/* Overlay – shown on hover */
.fpx-photo-actions {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity .2s;
    padding: 10px;
}
.fpx-photo-thumb-wrap:hover .fpx-photo-actions { opacity: 1; }



.fpx-btn-view, .fpx-btn-buy {
    padding: 7px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    max-width: 160px;
    text-align: center;
}
.fpx-btn-view { background: rgba(255,255,255,.92); color: #222; }
.fpx-btn-view:hover { background: #3eba70;  }
.fpx-btn-buy  { background: #34EB70 !important; color: #222 !important; }
.fpx-btn-buy:hover { background: #3eba70; }

/* Photo title below cell */
.fpx-photo-title { font-size: 11px; text-align: center; margin: 3px 0 0; color: #666; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpx-lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    width: 100% !important;
    max-width: 100% !important;
}
.fpx-lightbox-inner {
    position: relative; display: flex; align-items: center;
    max-width: 96vw; max-height: 96vh;
}
.fpx-lightbox-content { display: flex; flex-direction: column; align-items: center; }
#fpx-lightbox-img { max-width: 80vw; max-height: 80vh; border-radius: 4px; box-shadow: 0 0 40px rgba(0,0,0,.5); }
.fpx-lightbox-meta { text-align: center; margin-top: 12px; color: #fff; }
 
#fpx-lightbox-buy { margin-top: 10px; }
.fpx-lightbox-close {
    position: absolute; top: -40px; right: -10px;
    background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; line-height: 1;
}
.fpx-lightbox-prev, .fpx-lightbox-next {
    background: rgba(255,255,255,.15); border: none; color: #fff;
    font-size: 40px; padding: 10px 16px; cursor: pointer; border-radius: 4px; margin: 0 10px; line-height: 1;
}
.fpx-lightbox-prev:hover, .fpx-lightbox-next:hover { background: rgba(255,255,255,.3); }

/* Subalbum nav */
.fpx-breadcrumb { margin-bottom: 12px; }
.fpx-back-link { display: inline-block; padding: 5px 14px; background: #f0f0f0 !important; border-radius: 20px; text-decoration: none; font-size: 13px; color: #333 !important; }
.fpx-back-link:hover { background: #e0e0e0 !important; color: #111 !important; }
.fpx-empty { color: #999 !important; font-style: italic; }

@media (max-width: 900px) {
	.fpx-photo-thumb-wrap .fpx-photo-actions{opacity:1}
    .fpx-photo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .fpx-photo-grid { grid-template-columns: repeat(2, 1fr); }
    .fpx-album-grid { grid-template-columns: repeat(2, 1fr); }
    #fpx-lightbox-img { max-width: 92vw; }
    .fpx-lightbox-prev, .fpx-lightbox-next { font-size: 28px; padding: 8px 12px; }
	.fpx-album-row { align-items: flex-start; gap: 10px; padding-left: 12px !important; }
	.fpx-album-row-actions { flex-shrink: 0; }
	.fpx-modal-inner { max-height: 90vh; overflow-y: auto; padding: 20px; }
	.fpx-photo-picker-actions .fpx-btn-primary { width: 100%; }
}

/* ── Spinner / loading states ───────────────── */
@keyframes fpx-spin { to { transform: rotate(360deg); } }

.fpx-spinner {
    display: inline-block;
    width: 13px; height: 13px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fpx-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
/* Spinner inside light (non-primary, non-danger) buttons */
.fpx-btn:not(.fpx-btn-primary):not(.fpx-btn-danger) .fpx-spinner {
    border-color: rgba(0,0,0,.2);
    border-top-color: #444;
}

/* Full-page save overlay shown while watermarking */
.fpx-save-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    z-index: 99998;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: #fff; font-size: 16px; gap: 14px;
}
.fpx-save-overlay .fpx-spinner {
    width: 36px; height: 36px;
    border-width: 4px;
    border-color: rgba(255,255,255,.25);
    border-top-color: #fff;
}


 

/* Fix Modal Title */
.media-frame-title h1 {
    color: #1d2327 !important;
}


.media-menu-item{
    color: #1d2327 !important;
}

.media-modal-content .media-frame select.attachment-filters{
    width: 100% !important;
  max-width: unset !important;
}

/* Fix Tabs (Media Library, Upload Files) */
.media-router a {
    color: #3c434a !important;
}
.media-router a.active, 
.media-router a:focus {
    color: #1d2327 !important;
}

/* Fix Dropdowns, Inputs, and Labels */
.media-frame select.attachment-filters,
.media-frame input.search,
.media-frame .search-input,
.media-frame label,
.media-frame .media-toolbar-info {
    color: #3c434a !important;
}

/* Fix 'Showing X of Y media items' text */
.attachments-browser .media-toolbar-secondary,
.attachments-browser .media-toolbar-primary {
    color: #787c82 !important;
}

/* Ensure the background of inputs remains white so dark text is visible */
.media-frame select,
.media-frame input[type="text"],
.media-frame input[type="search"] {
    background-color: #fff !important;
    color: #3c434a !important;
}

.button-link.delete-attachment {
  font-size: 12px;
}




.fpx-auto-load-trigger {
	width: 100%;
	text-align: center;
	padding: 24px 0;
}

.fpx-load-more-spinner {
	display: none;
	width: 30px;
	height: 30px;
	margin: 0 auto 8px;
	border: 3px solid #e5e5e5;
	border-top-color: #2ee36d;
	border-radius: 50%;
	animation: fpx-spin 0.8s linear infinite;
}

.fpx-load-more-text {
	display: none;
	font-size: 13px;
	color: #555;
	margin: 0;
}

.fpx-gallery-load-wrap[data-loading="1"] .fpx-load-more-spinner,
.fpx-gallery-load-wrap[data-loading="1"] .fpx-load-more-text {
	display: block;
}

.fpx-gallery-load-wrap[data-has-more="0"] .fpx-auto-load-trigger {
	display: none;
}

@keyframes fpx-spin {
	to {
		transform: rotate(360deg);
	}
}