/**
 * City Girl Pro Stylesheet
 * Unlocks:
 * 1. Dark / Light Mode
 * 2. Social Sharing
 * 3. Like & Reactions System (with Royal +1 Burst)
 * 4. Popular Posts Widget
 * 5. Related Posts System (from docs)
 * 6. Author Profile Box (from docs)
 * 7. Scroll to Top Button (from docs)
 * 8. Sticky Header Support
 * 9. Advertisement Blocks
 * 10. Pro Layouts
 */

/* ==========================================================================
   1. Dark / Light Mode
   ========================================================================== */
.citygirl-dark-mode {
    --wp--preset--color--site-background: #14171a !important;
    --wp--preset--color--body-text: #e1e7ec !important;
    --wp--preset--color--custom-white: #1c2127 !important;
    --wp--preset--color--custom-reverse: #1a1e24 !important;
    --wp--preset--color--menu-background: #181c22 !important;
    --wp--preset--color--custom-border: rgba(255, 255, 255, 0.12) !important;
    --wp--preset--color--custom-dark: #f0f3f6 !important;
    --wp--preset--color--accent-grey: #9aa7b1 !important;
    color-scheme: dark;
}

.citygirl-dark-mode body,
body.citygirl-dark-mode {
    background-color: #14171a !important;
    color: #e1e7ec !important;
}

.citygirl-dark-mode .wp-block-group.has-custom-reverse-background-color,
.citygirl-dark-mode .wp-block-group.has-menu-background-background-color,
.citygirl-dark-mode .has-custom-reverse-background-color {
    background-color: #1b1f24 !important;
    color: #e1e7ec !important;
}

.citygirl-dark-mode .wp-block-post-content,
.citygirl-dark-mode .wp-block-post-content p,
.citygirl-dark-mode .wp-block-post-content li {
    color: #d6dde4;
}

.citygirl-dark-mode .wp-block-heading,
.citygirl-dark-mode h1,
.citygirl-dark-mode h2,
.citygirl-dark-mode h3,
.citygirl-dark-mode h4,
.citygirl-dark-mode h5,
.citygirl-dark-mode h6 {
    color: #f3f6f9;
}

.citygirl-dark-mode .wp-block-post-title a {
    color: #f3f6f9 !important;
}

.citygirl-dark-mode input[type="text"],
.citygirl-dark-mode input[type="search"],
.citygirl-dark-mode input[type="email"],
.citygirl-dark-mode textarea {
    background-color: #22272e !important;
    color: #f0f3f6 !important;
    border-color: #373e47 !important;
}

.citygirl-dark-mode .wp-block-separator {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Floating Dark Mode Switcher */
.citygirl-theme-toggle-fixed {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    padding: 0;
}

.citygirl-theme-toggle-fixed:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.citygirl-dark-mode .citygirl-theme-toggle-fixed {
    background: #252b33;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.citygirl-theme-toggle-fixed svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    color: #333333;
}

.citygirl-dark-mode .citygirl-theme-toggle-fixed svg {
    color: #f7b731;
}

/* ==========================================================================
   2. Social Sharing
   ========================================================================== */
.citygirl-social-share-box {
    margin: 32px 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--wp--preset--color--custom-border, #e5e7eb);
    border-radius: 12px;
}

.citygirl-dark-mode .citygirl-social-share-box {
    background: #1b1f24;
    border-color: rgba(255, 255, 255, 0.1);
}

.citygirl-share-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wp--preset--color--primary-color, #69bc93);
}

.citygirl-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.citygirl-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    color: #ffffff !important;
    transition: transform 0.15s ease, opacity 0.15s ease;
    cursor: pointer;
    border: none;
}

.citygirl-share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.citygirl-share-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.citygirl-share-fb { background-color: #1877f2; }
.citygirl-share-x { background-color: #0f1419; }
.citygirl-share-wa { background-color: #25d366; }
.citygirl-share-pin { background-color: #e60023; }
.citygirl-share-li { background-color: #0a66c2; }
.citygirl-share-copy {
    background-color: #57606a;
    position: relative;
}

.citygirl-share-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2328;
    color: #ffffff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.citygirl-share-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   3. Like & Reactions System (+ Royal +1 Floating Burst)
   ========================================================================== */
.citygirl-reactions-wrapper {
    margin: 32px 0;
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--wp--preset--color--custom-border, #e5e7eb);
    border-radius: 12px;
    text-align: center;
}

.citygirl-dark-mode .citygirl-reactions-wrapper {
    background: #1b1f24;
    border-color: rgba(255, 255, 255, 0.1);
}

.citygirl-reactions-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--wp--preset--color--custom-dark, #232323);
}

.citygirl-dark-mode .citygirl-reactions-title {
    color: #e6edf3;
}

.citygirl-reactions-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.citygirl-reaction-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    color: #24292f;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.citygirl-reaction-btn:hover {
    background: #ffffff;
    border-color: var(--wp--preset--color--primary-color, #69bc93);
    transform: translateY(-2px);
}

.citygirl-reaction-btn.is-active {
    background: rgba(105, 188, 147, 0.15);
    border-color: var(--wp--preset--color--primary-color, #69bc93);
    color: #0f6f40;
    font-weight: 600;
}

.citygirl-dark-mode .citygirl-reaction-btn {
    background: #252b33;
    border-color: #373e47;
    color: #e6edf3;
}

.citygirl-dark-mode .citygirl-reaction-btn.is-active {
    background: rgba(105, 188, 147, 0.25);
    border-color: var(--wp--preset--color--primary-color, #69bc93);
    color: #8ce3b4;
}

.citygirl-reaction-btn.is-animating {
    animation: citygirlPop 0.4s ease-out;
}

@keyframes citygirlPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.22); }
    100% { transform: scale(1); }
}

/* Royal Like Floating Burst */
.royal-like__float {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-weight: 700;
    font-size: 14px;
    color: var(--wp--preset--color--primary-color, #69bc93);
    opacity: 0;
    animation: royalLikeFloat .65s ease-out forwards;
}

@keyframes royalLikeFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, -20%) scale(.9);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--x, 0px)), -130%) scale(1.15);
    }
}

.citygirl-reaction-icon {
    font-size: 18px;
    line-height: 1;
}

.citygirl-reaction-count {
    font-weight: 600;
    font-size: 13px;
}

/* ==========================================================================
   4. Popular Posts Widget
   ========================================================================== */
.citygirl-popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.citygirl-popular-post-item {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wp--preset--color--custom-border, #eee);
}

.citygirl-popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.citygirl-popular-post-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--wp--preset--color--primary-color, #69bc93);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.citygirl-popular-post-thumb {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.citygirl-popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.citygirl-popular-post-item:hover .citygirl-popular-post-thumb img {
    transform: scale(1.08);
}

.citygirl-popular-post-info {
    flex-grow: 1;
}

.citygirl-popular-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px 0;
}

.citygirl-popular-post-title a {
    color: var(--wp--preset--color--body-text, #232323);
    text-decoration: none;
    transition: color 0.15s ease;
}

.citygirl-popular-post-title a:hover {
    color: var(--wp--preset--color--primary-color, #69bc93);
}

.citygirl-dark-mode .citygirl-popular-post-title a {
    color: #f0f3f6;
}

.citygirl-popular-post-meta {
    font-size: 12px;
    color: var(--wp--preset--color--accent-grey, #6e7b85);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   5. Related Posts System (from docs)
   ========================================================================== */
.citygirl-related-posts-wrap {
    margin: 36px 0;
    padding-top: 24px;
    border-top: 1px solid var(--wp--preset--color--custom-border, #e5e7eb);
}

.citygirl-related-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.citygirl-related-posts-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--wp--preset--color--custom-dark, #232323);
}

.citygirl-dark-mode .citygirl-related-posts-header h3 {
    color: #f3f6f9;
}

.citygirl-related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.citygirl-related-card {
    background: #ffffff;
    border: 1px solid var(--wp--preset--color--custom-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.citygirl-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.citygirl-dark-mode .citygirl-related-card {
    background: #1b1f24;
    border-color: rgba(255, 255, 255, 0.1);
}

.citygirl-related-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.citygirl-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.citygirl-related-card:hover .citygirl-related-thumb img {
    transform: scale(1.06);
}

.citygirl-related-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.citygirl-related-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wp--preset--color--primary-color, #69bc93);
    margin-bottom: 6px;
}

.citygirl-related-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.citygirl-related-title a {
    color: var(--wp--preset--color--body-text, #232323);
    text-decoration: none;
    transition: color 0.15s ease;
}

.citygirl-related-title a:hover {
    color: var(--wp--preset--color--primary-color, #69bc93);
}

.citygirl-dark-mode .citygirl-related-title a {
    color: #f3f6f9;
}

.citygirl-related-date {
    font-size: 12px;
    color: var(--wp--preset--color--accent-grey, #6e7b85);
    margin-top: auto;
}

/* ==========================================================================
   6. Author Profile Box (from docs)
   ========================================================================== */
.citygirl-author-box {
    margin: 32px 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--wp--preset--color--custom-border, #e5e7eb);
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.citygirl-dark-mode .citygirl-author-box {
    background: #1b1f24;
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    .citygirl-author-box {
        flex-direction: column;
        text-align: center;
    }
}

.citygirl-author-avatar {
    flex-shrink: 0;
}

.citygirl-author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.citygirl-author-info {
    flex-grow: 1;
}

.citygirl-author-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .citygirl-author-header {
        justify-content: center;
    }
}

.citygirl-author-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wp--preset--color--accent-grey, #6e7b85);
    font-weight: 600;
}

.citygirl-author-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.citygirl-author-name a {
    color: var(--wp--preset--color--custom-dark, #232323);
    text-decoration: none;
}

.citygirl-dark-mode .citygirl-author-name a {
    color: #f3f6f9;
}

.citygirl-author-bio {
    font-size: 13.5px;
    line-height: 1.55;
    color: #57606a;
    margin: 6px 0 10px 0;
}

.citygirl-dark-mode .citygirl-author-bio {
    color: #8b949e;
}

.citygirl-author-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 600px) {
    .citygirl-author-links {
        justify-content: center;
    }
}

.citygirl-author-links a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wp--preset--color--primary-color, #69bc93);
    text-decoration: none;
}

.citygirl-author-links a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   7. Scroll to Top Button (from docs)
   ========================================================================== */
.citygirl-scroll-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--wp--preset--color--primary-color, #69bc93);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
    padding: 0;
}

.citygirl-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.citygirl-scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}

.citygirl-scroll-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==========================================================================
   8. Sticky Header Support
   ========================================================================== */
.citygirl-sticky-header.is-stuck {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    animation: citygirlSlideDown 0.3s ease-out;
}

.citygirl-dark-mode .citygirl-sticky-header.is-stuck {
    background: rgba(20, 23, 26, 0.96) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@keyframes citygirlSlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ==========================================================================
   9. Advertisement Blocks
   ========================================================================== */
.citygirl-ad-container {
    margin: 24px auto;
    text-align: center;
    position: relative;
    max-width: 100%;
}

.citygirl-ad-label {
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8c959f;
    margin-bottom: 6px;
}

.citygirl-ad-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d0d7de;
    background: #f6f8fa;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.citygirl-dark-mode .citygirl-ad-slot {
    background: #1b1f24;
    border-color: #373e47;
}

.citygirl-ad-leaderboard {
    width: 728px;
    min-height: 90px;
}

.citygirl-ad-sidebar {
    width: 300px;
    min-height: 250px;
}

.citygirl-ad-content {
    width: 100%;
    min-height: 120px;
}

.citygirl-ad-slot a {
    display: block;
    width: 100%;
    height: 100%;
}

.citygirl-ad-slot img {
    max-width: 100%;
    height: auto;
    display: block;
}

.citygirl-ad-placeholder {
    padding: 20px;
    color: #57606a;
    font-size: 13px;
    line-height: 1.4;
}

.citygirl-dark-mode .citygirl-ad-placeholder {
    color: #8b949e;
}

/* ==========================================================================
   10. Pro Layouts & Badges
   ========================================================================== */
.citygirl-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.citygirl-newsletter-card {
    background: linear-gradient(135deg, rgba(105, 188, 147, 0.12) 0%, rgba(105, 188, 147, 0.04) 100%);
    border: 1px solid rgba(105, 188, 147, 0.3);
    border-radius: 16px;
    padding: 32px;
}

.citygirl-dark-mode .citygirl-newsletter-card {
    background: linear-gradient(135deg, rgba(105, 188, 147, 0.15) 0%, rgba(20, 23, 26, 0.8) 100%);
    border-color: rgba(105, 188, 147, 0.25);
}
