/* =================================================================
   UNIFIED PROFILE PAGES STYLES
   Pro funkce: custom_profile_page_shortcode & moje_analyza_shortcode
   ================================================================= */

/* ===== RESTRICTED CONTENT STYLES ===== */
.analyza-restricted {
    padding: 40px 20px;
    margin: 24px 0;
}

.restricted-message {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: white;
    padding: 48px 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.restricted-message svg {
    margin-bottom: 24px;
}

.restricted-message h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.restricted-message p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.analyza-current-membership {
    background: #f9fafb;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px !important;
    margin: 16px 0 24px 0 !important;
}

.analyza-membership-badge-small {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #e5e7eb;
    color: #1f2937;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
}

.analyza-btn-login,
.analyza-btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.analyza-btn-login:hover,
.analyza-btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.analyza-premium-required {
    border: 2px solid #fbbf24;
}

.analyza-premium-required h3 {
    color: #78350f;
}

/* ===== MAIN PAGE CONTAINERS ===== */
.custom-profile-page,
.analyza-profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== HEADER WITH GRADIENT ===== */
.profile-header,
.analyza-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 32px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

/* Membership indicator - pravý výřez */
.membership-indicator,
.analyza-membership-indicator {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 30% 100%, 0% 50%);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

/* Registrovaný - bronzová */
.membership-registrovaný,
.analyza-membership-registrovaný {
    background: linear-gradient(135deg, #cd7f32 0%, #8b5a2b 100%);
}

/* Předplatitel - zlatá */
.membership-předplatitel,
.analyza-membership-předplatitel {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
}

/* Premium - platinová */
.membership-premium,
.analyza-membership-premium {
    background: linear-gradient(135deg, #e5e4e2 0%, #9ca3af 100%);
}

/* VIP - diamantová */
.membership-vip,
.analyza-membership-vip {
    background: linear-gradient(135deg, #b9f2ff 0%, #00a8cc 100%);
}

.membership-badge,
.analyza-membership-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding-left: 70px;
}

.membership-badge svg,
.analyza-membership-badge svg {
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.membership-level-text,
.analyza-membership-level-text {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.profile-avatar,
.analyza-avatar {
    flex-shrink: 0;
}

.profile-avatar img,
.analyza-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50% !important;
    border: 4px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

.profile-header-info,
.analyza-header-info {
    flex: 1;
    color: white;
    z-index: 1;
}

.profile-name,
.analyza-name {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.profile-email,
.analyza-email {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 12px 0;
}

.profile-meta-column,
.analyza-meta-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-member-since,
.profile-last-login,
.analyza-member-since,
.analyza-last-login {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.85;
}

.profile-member-since svg,
.profile-last-login svg,
.analyza-member-since svg,
.analyza-last-login svg {
    fill: white;
    flex-shrink: 0;
}

/* ===== PERSONAL INFO SECTION ===== */
.personal-info-section,
.analyza-personal-info-section {
    margin-bottom: 40px;
}

.bio-text,
.analyza-bio-text {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ===== GRID WITH CARDS ===== */
.profile-grid,
.analyza-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.profile-card,
.analyza-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.profile-card:hover,
.analyza-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.reading-chart-card,
.analyza-reading-chart-card {
    grid-column: 1 / -1;
    margin-bottom: 40px;
}

.card-header,
.analyza-card-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header svg,
.analyza-card-header svg {
    fill: #667eea;
    flex-shrink: 0;
}

.card-header h2,
.analyza-card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.chart-total,
.analyza-chart-total {
    margin-left: auto;
    font-size: 14px;
    color: #6b7280;
}

.chart-total strong,
.analyza-chart-total strong {
    color: #667eea;
    font-size: 16px;
}

.card-body,
.analyza-card-body {
    padding: 24px;
}

/* ===== USER POSTS & SOCIAL SECTIONS ===== */
.user-posts-section,
.social-section,
.analyza-user-posts-section,
.analyza-social-section {
    margin-top: 40px;
}

.section-header,
.analyza-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2,
.analyza-section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.posts-count,
.analyza-posts-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.posts-card,
.social-card,
.analyza-posts-card,
.analyza-social-card {
    transform: none !important;
}

/* ===== ACCORDION STYLES ===== */
.posts-accordion,
.analyza-posts-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-item,
.analyza-accordion-item {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.accordion-item:hover,
.analyza-accordion-item:hover {
    border-color: #667eea;
}

.accordion-item.active,
.analyza-accordion-item.active {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.accordion-header,
.analyza-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    background: #f9fafb;
    transition: all 0.3s;
}

.accordion-item.active .accordion-header,
.analyza-accordion-item.active .analyza-accordion-header {
    background: #f0f4ff;
}

.accordion-title-wrapper,
.analyza-accordion-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.accordion-thumbnail,
.analyza-accordion-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.accordion-thumbnail img,
.analyza-accordion-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.accordion-meta,
.analyza-accordion-meta {
    flex: 1;
    min-width: 0;
}

.accordion-title,
.analyza-accordion-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.accordion-info,
.analyza-accordion-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.post-date,
.post-category,
.analyza-post-date,
.analyza-post-category {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.post-date svg,
.post-category svg,
.analyza-post-date svg,
.analyza-post-category svg {
    fill: #9ca3af;
}

.accordion-toggle,
.analyza-accordion-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.accordion-toggle:hover,
.analyza-accordion-toggle:hover {
    background: #667eea;
}

.accordion-toggle:hover svg,
.analyza-accordion-toggle:hover svg {
    fill: white;
}

.accordion-toggle svg,
.analyza-accordion-toggle svg {
    fill: #667eea;
    transition: all 0.3s;
}

.accordion-item.active .accordion-toggle svg,
.analyza-accordion-item.active .analyza-accordion-toggle svg {
    transform: rotate(180deg);
}

.accordion-content,
.analyza-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.active .accordion-content,
.analyza-accordion-item.active .analyza-accordion-content {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.accordion-excerpt,
.analyza-accordion-excerpt {
    padding: 0 20px 20px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

.read-more-btn,
.analyza-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 20px 20px 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.read-more-btn:hover,
.analyza-read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.read-more-btn svg,
.analyza-read-more-btn svg {
    fill: white;
}

/* ===== SOCIAL LINKS ===== */
.social-links,
.analyza-social-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.social-link,
.analyza-social-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.social-link:hover,
.analyza-social-link:hover {
    background: white;
    border-color: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-icon,
.analyza-social-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-facebook,
.analyza-social-facebook {
    background: #1877f2;
}

.social-twitter,
.analyza-social-twitter {
    background: #1da1f2;
}

.social-linkedin,
.analyza-social-linkedin {
    background: #0a66c2;
}

.social-instagram,
.analyza-social-instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.social-youtube,
.analyza-social-youtube {
    background: #ff0000;
}

.social-website,
.analyza-social-website {
    background: #667eea;
}

.social-icon svg,
.analyza-social-icon svg {
    fill: white;
}

.social-info,
.analyza-social-info {
    flex: 1;
    min-width: 0;
}

.social-name,
.analyza-social-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.social-url,
.analyza-social-url {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== MEMBERSHIP INFO ===== */
.membership-info,
.analyza-membership-info {
    margin-bottom: 20px;
}

.info-row,
.analyza-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child,
.analyza-info-row:last-child {
    border-bottom: none;
}

.info-label,
.analyza-info-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.info-value,
.analyza-info-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}

.membership-level,
.analyza-membership-level {
    color: #667eea;
    font-size: 16px;
}

.status-badge,
.analyza-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-active,
.analyza-status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive,
.analyza-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn svg {
    fill: currentColor;
}

/* ===== ACTION LINKS ===== */
.action-links,
.analyza-action-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-link,
.analyza-action-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #f9fafb;
    text-decoration: none !important;
    transition: all 0.3s;
}

.action-link:hover,
.analyza-action-link:hover {
    background: #f3f4f6;
    transform: translateX(4px);
    text-decoration: none !important;
}

.action-link svg,
.analyza-action-link svg {
    fill: #667eea;
    flex-shrink: 0;
}

.link-title,
.analyza-link-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
    text-decoration: none !important;
}

.link-desc,
.analyza-link-desc {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none !important;
}

/* ===== STATS ===== */
.stats-grid,
.analyza-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item,
.analyza-stat-item {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.stat-value,
.analyza-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-label,
.analyza-stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* ===== CHART ===== */
.reading-chart,
.analyza-reading-chart {
    position: relative;
    height: 300px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .profile-header,
    .analyza-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        padding-bottom: 80px !important;
        position: relative;
        overflow: visible !important;
    }

    .profile-name,
    .analyza-name {
        font-size: 24px;
    }

    .profile-meta-column,
    .analyza-meta-column {
        align-items: center;
        margin-bottom: 0;
    }

    .membership-indicator,
    .analyza-membership-indicator {
        position: absolute !important;
        width: 100% !important;
        height: 60px !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        clip-path: none !important;
        border-radius: 0 0 20px 20px !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .membership-badge,
    .analyza-membership-badge {
        flex-direction: row !important;
        padding: 0 !important;
        justify-content: center !important;
        gap: 10px !important;
        width: auto !important;
    }

    .membership-badge svg,
    .analyza-membership-badge svg {
        width: 24px !important;
        height: 24px !important;
    }

    .membership-level-text,
    .analyza-membership-level-text {
        font-size: 14px !important;
        font-weight: 700 !important;
    }

    .profile-grid,
    .analyza-grid {
        grid-template-columns: 1fr;
    }

    .custom-profile-page,
    .analyza-profile-page {
        padding: 20px 15px;
    }

    .chart-total,
    .analyza-chart-total {
        display: none;
    }

    .reading-chart,
    .analyza-reading-chart {
        height: 250px;
    }

    .social-links,
    .analyza-social-links {
        grid-template-columns: 1fr;
    }

    .accordion-title-wrapper,
    .analyza-accordion-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .accordion-thumbnail,
    .analyza-accordion-thumbnail {
        width: 100%;
        height: 180px;
    }

    .accordion-title,
    .analyza-accordion-title {
        font-size: 16px;
    }

    .accordion-header,
    .analyza-accordion-header {
        padding: 16px;
    }

    .accordion-info,
    .analyza-accordion-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

