/* Saller Pro Frontend Styles */
a.saller-pro-open-modal {
    cursor: pointer;
    display: inline-block;
    margin-top: 15px;
    padding: 5px 0;
}

/* Modal Styles */
.saller-pro-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 100000; display: flex;
    align-items: center; justify-content: center; padding: 20px;
}
.saller-pro-modal-content {
    background: #fff; padding: 25px 30px; border-radius: 8px;
    width: 100%; max-width: 650px; position: relative;
    max-height: 90vh; overflow-y: auto; box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}
.saller-pro-close-modal {
    position: absolute; top: 10px; right: 10px; background: transparent;
    border: none; font-size: 24px; line-height: 1; cursor: pointer;
    color: #999; border-radius: 50%; width: 32px; height: 32px; text-align: center;
}
.saller-pro-close-modal:hover { color: #333; background-color: #f1f1f1; }
.modal-body .loader {
    border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%;
    width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 40px auto;
}
.saller-pro-modal-details .modal-title {
    margin-top: 0; margin-bottom: 25px; padding-bottom: 15px;
    border-bottom: 1px solid #eee; font-size: 22px; color: #2c3e50;
}
.saller-pro-modal-details .saller-section { margin-bottom: 20px; }
.saller-section .section-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.saller-section h4 { margin: 0; font-size: 16px; color: #34495e; }
.saller-section .copyable-content {
    background-color: #f9f9f9; border: 1px solid #e9e9e9; padding: 15px;
    border-radius: 5px; font-size: 15px; color: #555; line-height: 1.6;
}
.saller-section .copyable-content p:last-child { margin-bottom: 0; }
.copy-btn {
    background: transparent; border: 1px solid #ccc; color: #777;
    cursor: pointer; border-radius: 5px; padding: 4px 6px; line-height: 1; position: relative;
}
.copy-btn:hover { background-color: #f1f1f1; border-color: #aaa; color: #333; }
.copy-btn .dashicons { font-size: 18px; vertical-align: middle; }
.copy-btn .copy-feedback {
    position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
    background-color: #2c3e50; color: #fff; padding: 3px 8px;
    border-radius: 3px; font-size: 12px; white-space: nowrap; display: none;
}
.main-image-section .main-image-container {
    padding: 10px; border: 1px solid #eee; border-radius: 5px; text-align: center;
}
.main-image-section .main-image-container img {
    max-width: 100%; height: auto; border-radius: 4px;
}
.main-image-download-btn {
    color: #777; border: 1px solid #ccc; border-radius: 5px; padding: 4px;
    line-height: 1; text-decoration: none;
}
.main-image-download-btn:hover { background-color: #f1f1f1; color: #333; }
.main-image-download-btn .dashicons { font-size: 20px; vertical-align: middle; }
.media-gallery { display: flex; flex-direction: column; gap: 10px; }
.media-item {
    display: flex; align-items: center; background-color: #f9f9f9;
    border: 1px solid #e9e9e9; padding: 10px 15px; border-radius: 5px;
}
.media-item .media-icon { margin-right: 12px; font-size: 22px; color: #5091c6; }
.media-item .media-title {
    flex-grow: 1; font-size: 14px; color: #444;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-item .media-download { color: #777; text-decoration: none; margin-left: 15px; }
.media-item .media-download:hover { color: #2980b9; }
.media-item .media-download .dashicons { font-size: 20px; vertical-align: middle; }

/* === UPDATED Archive Page Styles === */
.saller-pro-archive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}
.sp-archive-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.sp-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.sp-archive-image a {
    display: block;
    line-height: 0; /* Prevents extra space below image */
}
.sp-archive-image img {
    width: 100%;
    height: auto; /* This maintains the original aspect ratio */
    object-fit: contain; /* Ensures the whole image is visible */
    display: block;
}
.sp-archive-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.sp-archive-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}
.sp-archive-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}
.sp-archive-title a:hover { color: #0073aa; }
.sp-archive-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}
.sp-archive-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}
.sp-archive-btn {
    text-decoration: none;
    color: #555;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s, color 0.3s;
}
.sp-archive-btn:hover {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.sp-archive-btn .dashicons {
    font-size: 18px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Custom Styles for Copy Button Icon === */
.saller-pro-modal-content .copy-btn {
    padding: 5px 8px; /* Adjusted padding for better fit */
    margin-left: 10px;
    display: inline-flex; /* Helps align icon and text */
    align-items: center;
}

.saller-pro-modal-content .copy-btn .dashicons {
    font-family: 'Dashicons';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block; /* Ensure icon is displayed */
    font-size: 18px; /* Explicitly set font size */
    vertical-align: middle; /* Better vertical alignment */
}

.saller-pro-modal-content .copy-btn .copy-feedback {
    display: none; /* Initially hidden */
}