/* WR Name Person - Frontend Styles */

.wr-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wr-gallery-controls {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.wr-gallery-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.wr-gallery-form select[name="gallery_status"] {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    background-color: #fff;
}

.wr-custom-select {
    position: relative;
    width: 100%;
}

.wr-custom-select-toggle {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    color: #000;
    font-weight: 400;
    text-transform: none;
}

.wr-custom-select-toggle:hover {
    background-color: #fff;
}

.wr-custom-select-toggle::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #555;
}

.wr-custom-select-options {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    margin-top: 4px;
    list-style: none;
    padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: none;
    z-index: 10;
}

.wr-custom-select.open .wr-custom-select-options {
    display: block;
}

.wr-custom-select-option {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 15px;
}

.wr-custom-select-option:hover,
.wr-custom-select-option.selected {
    background: #007cba;
    color: #fff;
}

.wr-search-field,
.wr-filter-field {
    flex: 1;
    min-width: 200px;
}

.wr-search-field input,
.wr-filter-field select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    background: #fff;
}

.wr-search-button {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wr-search-button:hover {
    background: #005a87;
}

.wr-gallery-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.wr-gallery-grid.wr-columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.wr-gallery-grid.wr-columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.wr-gallery-grid.wr-columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.wr-gallery-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wr-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.wr-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.wr-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wr-gallery-item:hover .wr-gallery-image {
    transform: scale(1.05);
}

.wr-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.wr-gallery-item:hover .wr-image-overlay {
    opacity: 1;
}

.wr-view-full,
.wr-suggest-name {
    background: #fff;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.wr-view-full:hover {
    background: #007cba;
    color: #fff;
}

.wr-suggest-name:hover {
    background: #28a745;
    color: #fff;
}

.wr-image-info {
    padding: 15px;
    text-align: center;
}

.wr-confirmed-name {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
}

.wr-status-pending {
    color: #6c757d;
    font-style: italic;
}

.wr-no-images {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.wr-gallery-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.wr-gallery-pagination a {
    display: inline-block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #007cba;
    font-weight: 500;
    transition: all 0.2s;
}

.wr-gallery-pagination a:hover,
.wr-gallery-pagination a.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Lightbox */
.wr-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
    max-width: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wr-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wr-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.wr-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#wr-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Modal */
.wr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
    max-width: none;
}

.wr-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.wr-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.wr-modal-close:hover {
    color: #333;
}

.wr-modal h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.wr-form-field {
    margin-bottom: 20px;
}

.wr-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.wr-form-field input {
    width: -webkit-fill-available;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.wr-form-field input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.wr-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.wr-submit-button {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

.wr-submit-button:hover {
    background: #005a87;
}

.wr-cancel-button {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

.wr-cancel-button:hover {
    background: #545b62;
}

/* Stats */
.wr-stats-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.wr-stats-section {
    margin-bottom: 30px;
}

.wr-stats-section:last-child {
    margin-bottom: 0;
}

.wr-stats-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.wr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.wr-stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.wr-stat-number {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #007cba;
    line-height: 1;
    margin-bottom: 5px;
}

.wr-stat-label {
    color: #6c757d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Component */
.wr-search-container {
    margin: 20px 0;
}

.wr-search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.wr-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
}

.wr-search-submit {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wr-search-submit:hover {
    background: #005a87;
}

/* Loading states */
.wr-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .wr-gallery-container {
        padding: 15px;
    }
    
    .wr-gallery-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wr-search-field,
    .wr-filter-field {
        min-width: auto;
    }
    
    .wr-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .wr-image-wrapper {
        height: 200px;
    }
    
    .wr-modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .wr-form-actions {
        flex-direction: column;
    }
    
    .wr-lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .wr-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
        background: rgba(0, 0, 0, 0.7);
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    
    .wr-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .wr-search-form {
        flex-direction: column;
    }
}
