/*
 * Plugin: GiantSponge Gallery Tools
 * File: styles.css
 * Description: Global stylesheet for the GiantSponge Gallery Tools plugin.
 */

/* Base container styles */
table.wp-list-table {
    width: 100%;
}

.card2 {
    background-color: white;
}

.user-info-display,
.user-info-not-logged-in {
    border: 1px solid #ddd;
    padding: 20px 20px 0px 20px;
    border-radius: 5px;
    margin: 20px auto;
}

.user-info-display h3 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Tab Styles */
.user-profile-tabs {
    display: flex;
    flex-direction: column;
    margin-bottom: 0px;
}

.user-profile-tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0px;
    padding-left: 1px;
}

.user-profile-tab-button {
    background-color: #f1f1f1;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
    font-size: 16px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    margin-right: 2px;
    white-space: nowrap;
    color: #333;
}

.user-profile-tab-button:hover {
    background-color: #e2e2e2;
}

.user-profile-tab-button.active {
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom: none;
    position: relative;
    top: 1px;
    font-weight: bold;
    color: #333;
}

.user-profile-tab-content {
    padding: 15px 0;
    border-top: 1px solid #eee;
}

/* Message styles */
.user-info-message {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;

}

.user-info-message.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.user-info-message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Static view styles */
.user-static-info {
    margin-bottom: 25px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 15px;
}

.user-static-info p {
    margin-bottom: 8px;
}

.user-static-info p strong {
    display: inline-block;
    min-width: 120px;
}

.user-bio-section-view {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.user-bio-section-view h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.user-info-edit-button-wrap {
    text-align: center;
}

/* Editable form styles */
.user-edit-form {
    margin-top: 20px;
}

.user-info-field {
    margin-bottom: 15px;
}

.user-info-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.95em;
}

/* Hide original textarea when wp_editor replaces it */
#description_edit {
    display: none;
}

.user-info-field input[type="text"],
.user-info-field input[type="email"],
.user-info-field input[type="url"] {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.user-info-field textarea {
    resize: vertical;
}

.description-hint,
.email-info-hint {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}

.user-info-submit {
    text-align: center;
    margin-top: 30px;
}

.user-info-submit input[type="submit"] {
    padding: 5px;
    margin-right: 10px;
}

/* Common informational links */
.user-info-password-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    font-size: 0.9em;
    color: #666;
}

.user-info-password-info a {
    font-weight: bold;
}

.user-info-logout-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* User Info Header for Specific Galleries */
.gsgallery-user-info-header {
    margin: 20px auto;
    padding: 15px;
}

.gsgallery-user-info-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.gsgallery-user-info-header p {
    color: #666;
    line-height: 1.5;
}

/* Styles for [user-gallery-info] shortcode */
.user-gallery-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    border-radius: 8px;
    margin: 0px;
}

.user-gallery-image {
    flex: 0 0 200px;
    width: 200px;
    height: 300px;
    overflow: hidden;
}

.user-gallery-image-wrapper {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.user-gallery-profile-image {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    min-height: 300px;
}

.user-gallery-image-placeholder {
    text-align: center;
    color: #888;
}

.user-gallery-content {
    flex: 1;
    min-width: 250px;
}

.user-gallery-content h1 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: capitalize;
}

.user-gallery-content p {
    margin-bottom: 15px;
}

.user-gallery-content a {
    font-weight: bold;
}

/* New: Wrapper for stacked stats boxes */
.user-side-stats {
    flex: 0 0 220px;
    /* Aligns this column with the side, taking up 200px width */
    display: flex;
    flex-direction: column;
    /* Stacks its children vertically */
    gap: 20px;
    /* Space between the two stats boxes */
    width: 220px;
    /* Ensure it maintains its width in context of user-gallery-info */
}

/* New: User Meta Stats Box */
.user-meta-stats {
    padding: 10px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
    /* Removed fixed width/flex properties, it will now take 100% of .user-side-stats */
}

.user-meta-stats h2 {
    margin-top: 0;
    font-size: 1.2em;
    color: #333;
}

.user-meta-stats p {
    margin-bottom: 5px;
    font-size: 0.9em;
    word-wrap: break-word;
}

.user-meta-stats p strong {
    margin-right: 5px;
}

.user-gallery-info-error {
    color: #e74c3c;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background-color: #fdd;
    border: 1px solid #fcc;
    border-radius: 5px;
}

/* Container for gallery actions buttons */
.gallery-actions {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Wrapper for individual gallery thumbnails */
.user-gallery-thumbnails-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Individual gallery thumbnail container */
.user-gallery-thumbnail {
    position: relative;
    border: 1px solid #ddd;
    padding: 5px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    flex: 0 0 calc(100px + 10px);
    max-width: 110px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Styling for the image itself */
.user-gallery-thumbnail img {
    display: block;
    max-width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Styling for gallery thumbnail checkboxes */
.gallery-thumbnail-checkbox {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 10;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.gallery-empty-message {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #777;
}

/* WordPress Admin Button Overrides */
.button {
    background: #f3f3f3;
    border: 1px solid #ccc;
    color: #555;
    text-decoration: none;
    text-shadow: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 26px;
    height: 28px;
    padding: 0 10px 1px;
    cursor: pointer;
    -webkit-border-radius: 3px;
    -webkit-appearance: none;
    border-radius: 3px;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.1s ease-in-out;
}

.button-primary {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
    text-shadow: none;
}

.button-danger {
    background: #dc3232;
    border-color: #dc3232;
    color: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
    text-shadow: none;
}

.button-secondary {
    color: #555;
    border-color: #ccc;
    background: #f3f3f3;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
    text-shadow: none;
}

.button:hover,
.button-primary:hover,
.button-danger:hover,
.button-secondary:hover {
    filter: brightness(110%);
}

/* Basic styling for the full-width button and message */
.gsgallery-copy-url-wrapper{
    margin-top: -22px;
}
.gsgallery-copy-button {
    width: 100%;
    display: block;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gsgallery-copy-button .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

.gsgallery-copy-message {
    display: block;
    text-align: center;
    margin-top: 5px;
    color: green;
    font-weight: bold;
}