/* Dashboard Ad and Partner Banner Styles */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Spinner Animation */
.spinner-icon {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
    max-width: min(92vw, 520px);
}

.loading-overlay-spinner {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
}

.loading-overlay-text {
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

.partners-slot-video, .dashboard-banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Partner video container styles for dashboard */
.partner-video-container {
    height: 100px;
    width: 133px; /* 4:3 aspect ratio approximately */
    flex-shrink: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.partner-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.partner-display-flex {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    overflow: hidden;
}
.partner-text-container {
    flex: 1;
    padding: 0 16px;
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    text-align: left;
}

/* Allow heading tags within partner text to display at proper sizes */
.partner-text-container h1 {
    font-size: 2em;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

.partner-text-container h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
    line-height: 1.3;
}

.partner-text-container h3 {
    font-size: 1.17em;
    font-weight: bold;
    margin: 0;
    line-height: 1.4;
}

.partner-text-container p {
    margin: 0.5em 0;
}

.partner-text-container strong, 
.partner-text-container b {
    font-weight: bold;
}

.partner-text-container em, 
.partner-text-container i {
    font-style: italic;
}

/* Post Management Styles */
.delete-post-btn {
    cursor: pointer;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
    background-color: #B02376 !important; /* Pink brand color */
    border: 1px solid #B02376 !important;
    min-width: 32px;
    min-height: 32px;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.delete-post-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff !important;
    fill: none;
    display: block !important;
}

.delete-post-btn svg path,
.delete-post-btn svg line,
.delete-post-btn svg polyline {
    stroke: #ffffff !important;
}

.delete-post-btn .delete-label {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.75rem;
}

.post-comments {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.post-comments-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.post-comments-count {
    color: #6b7280;
    font-weight: 500;
}

.post-comment-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.post-comment-textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    background: #ffffff;
}

.post-comment-textarea:focus {
    outline: none;
    border-color: #B02376;
    box-shadow: 0 0 0 3px rgba(176, 35, 118, 0.15);
}

.post-comment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.post-comment-counter {
    color: #6b7280;
    font-size: 0.8rem;
}

.post-comment-error {
    margin-top: 10px;
}

.post-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-comments-empty {
    text-align: center;
    padding: 18px 0;
    color: #6b7280;
}

.post-comment-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    background: #ffffff;
}

.post-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.members-dashboard .feed-post .post-content {
    display: block;
    gap: 0;
}

#editor .ql-editor p {
    margin: 0;
    line-height: 1.6;
}

#editor .ql-editor p + p {
    margin-top: 0.6em;
}

.feed-post .post-content p {
    margin: 0 0 0.6em;
    line-height: 1.6;
}

.feed-post .post-content p:last-child {
    margin-bottom: 0;
}

.post-comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(176, 35, 118, 0.12);
    color: #B02376;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.post-comment-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: #111827;
}

.post-comment-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.post-comment-body {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.post-comments-more {
    text-align: center;
    margin-top: 14px;
}

/* Ensure actions container is always visible */
.post-actions,
.owner-actions {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Specific fix for desktop visibility */
@media (min-width: 768px) {
    .delete-ad-btn {
        display: inline-flex !important;
    }
}

.delete-ad-btn:hover {
    background-color: #8a1c5c !important; /* Darker pink */
    border-color: #8a1c5c !important;
}

.ad-thumbnail {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

/* Quick Tips Styles */
.quick-tips-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.quick-tips-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
    margin-top: 0;
}

.quick-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #4b5563;
}

.quick-tips-item {
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.quick-tips-item:last-child {
    margin-bottom: 0;
}

.quick-tips-bullet {
    color: #B02376;
    font-weight: bold;
    margin-top: 2px;
    flex-shrink: 0;
}

/* --- Styles from partners-banner.hbs --- */
#partners-banner-section {
    width: 100%;
}
#partners-banner-section .hidden {
    display: none !important;
}
.partners-banner-wrapper {
    background: var(--bg-color-secondary, #f9fafb);
    border-radius: 12px;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}
.partners-banner-container {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, var(--content-max-width, 1200px));
}
.partners-banner-title {
    color: var(--text-color-0, #15171A);
    text-align: left;
}
.partners-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    align-items: stretch;
}
/* Full width mode for image-only ads */
.partners-grid.full-width-mode .partners-media-column {
    grid-column: 1 / -1;
}
.partners-grid.full-width-mode .partners-detail-column {
    display: none;
}
.partners-media-column {
    grid-column: span 2;
}
.partners-detail-column {
    grid-column: span 2;
    display: flex;
}
.partners-detail-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    display: flex;
}
.partner-detail-link {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: inherit;
    text-decoration: none;
    width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.partner-detail-link:hover {
    transform: translateY(-2px);
}
.partner-detail-header {
    display: flex;
    gap: 16px;
    align-items: center;
}
.partner-detail-logo {
    width: 80px; /* Reduced from 200px for dashboard context */
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-color-secondary, #f3f4f6);
    padding: 8px;
}
.partner-detail-text {
    flex: 1;
}
.partner-media-wrapper {
    flex-shrink: 0;
    width: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color-secondary, #f3f4f6);
    border-radius: 6px;
    overflow: hidden;
    margin: 0;
    position: relative;
}
.partner-media-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    text-decoration: none;
    z-index: 1;
}
.partner-media-wrapper .partner-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.partner-media-wrapper .partner-media.video {
    object-fit: cover;
    pointer-events: none;
    background: black;
}
.partner-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color-0, #15171A);
    margin: 0 0 4px 0;
    line-height: 1.3;
}
.partner-headline {
    font-size: 0.95rem;
    color: var(--text-color-1, #4b5563);
    margin: 0;
    line-height: 1.5;
}
.partner-description {
    color: var(--text-color-1, #4b5563);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}
/* Responsive design */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .partners-media-column,
    .partners-detail-column {
        grid-column: span 1;
    }
    .partner-name {
        font-size: 1.1rem;
    }
}

/* Header Layout Overrides */
.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dashboard-header-actions {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
}

/* Ensure flex utilities work if not already available */
.flex { display: flex !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.gap-4 { gap: 1rem !important; }
.gap-3 { gap: 0.75rem !important; }
.hidden { display: none !important; }
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.rounded-full { border-radius: 9999px !important; }
.text-right { text-align: right !important; }
.text-sm { font-size: 0.875rem !important; }
.text-xs { font-size: 0.75rem !important; }
.font-bold { font-weight: 700 !important; }
.text-gray-900 { color: #111827 !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-pink-600 { color: #db2777 !important; }
.bg-pink-600 { background-color: #db2777 !important; }
.text-white { color: #ffffff !important; }
.border-2 { border-width: 2px !important; }
.border-white { border-color: #ffffff !important; }
.border-gray-100 { border-color: #f3f4f6 !important; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
.-bottom-1 { bottom: -0.25rem !important; }
.-right-1 { right: -0.25rem !important; }
.w-10 { width: 2.5rem !important; }
.h-10 { height: 2.5rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.object-cover { object-fit: cover !important; }

.dashboard-version-badge {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 10000;
    padding: 6px 10px;
    border-radius: 9999px;
    background: rgba(17, 24, 39, 0.8);
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(6px);
}

.form-control {
    width: 100%;
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #ffffff;
    color: #111827;
}

.form-control:focus {
    outline: none;
    border-color: #B02376;
    box-shadow: 0 0 0 3px rgba(176, 35, 118, 0.15);
}

/* Ensure admin dashboard selects render at usable size even without Tailwind utilities */
#adminAdsPendingList select,
#partnerBannerAdminCard select {
    width: 100%;
    min-height: 34px;
}

/* Profile Image Upload Wrappers */
.avatar-upload-wrapper,
.logo-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avatar-preview-img,
.logo-preview-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.avatar-preview-img {
    border-radius: 50%;
}

.media-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.media-remove-btn {
    padding: 6px 12px;
    font-size: 0.875rem;
    color: #dc2626;
    background: transparent;
    border: 1px solid #dc2626;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.media-remove-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

.upload-status {
    font-size: 0.875rem;
    font-weight: 500;
}
