/**
 * Premium Frontend Styles for Affiliate Promoter
 * Tool cards, listicles, comparison tables, embed badges
 */

/* ========================================
   BASE STYLES
   ======================================== */
.wap-tool-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.wap-tool-card.wap-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.wap-tool-card.wap-hover-glow:hover {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.wap-tool-card.wap-hover-scale:hover {
    transform: scale(1.02);
}

/* ========================================
   TOOL HEADER
   ======================================== */
.wap-tool-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    position: relative;
}

.wap-position-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.wap-position-1 {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #7c2d12;
}

.wap-position-2 {
    background: linear-gradient(135deg, #e5e7eb, #c0c0c0);
    color: #374151;
}

.wap-position-3 {
    background: linear-gradient(135deg, #fcd9bd, #cd7f32);
    color: #7c2d12;
}

.wap-tool-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.wap-tool-info {
    flex: 1;
    min-width: 0;
}

.wap-tool-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.wap-tool-tagline {
    margin: 4px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.wap-tool-pricing {
    text-align: right;
    flex-shrink: 0;
}

.wap-price {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #059669;
}

.wap-commission {
    font-size: 12px;
    color: #6b7280;
}

.wap-tool-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ========================================
   BUTTONS
   ======================================== */
.wap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.wap-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.wap-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    color: #fff;
}

.wap-btn-copy {
    width: 40px;
    height: 40px;
    padding: 0;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 10px;
}

.wap-btn-copy:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.wap-btn-copy.copied {
    background: #10b981;
    color: #fff;
}

.wap-btn-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    color: #6b7280;
    border-radius: 10px;
}

.wap-btn-toggle:hover {
    background: #f3f4f6;
}

.wap-chevron {
    transition: transform 0.3s;
}

.wap-btn-toggle[aria-expanded="true"] .wap-chevron {
    transform: rotate(180deg);
}

/* ========================================
   TAGS
   ======================================== */
.wap-tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 16px;
}

.wap-tag {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ========================================
   DROPDOWN CONTENT
   ======================================== */
.wap-tool-dropdown {
    border-top: 1px solid #e5e7eb;
    padding: 24px;
    background: #fafafa;
    animation: wapSlideDown 0.3s ease;
}

@keyframes wapSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wap-section {
    margin-bottom: 24px;
}

.wap-section:last-child {
    margin-bottom: 0;
}

.wap-section h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.wap-section p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.wap-features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wap-features-list li {
    padding-left: 24px;
    position: relative;
    color: #4b5563;
    font-size: 14px;
}

.wap-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* ========================================
   PROS & CONS
   ======================================== */
.wap-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.wap-pros,
.wap-cons {
    padding: 16px;
    border-radius: 12px;
}

.wap-pros {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.wap-cons {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.wap-pros h4,
.wap-cons h4 {
    margin: 0 0 10px;
    font-size: 13px;
}

.wap-pros ul,
.wap-cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wap-pros li,
.wap-cons li {
    font-size: 13px;
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
}

.wap-pros li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
}

.wap-cons li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #ef4444;
}

/* ========================================
   CHART
   ======================================== */
.wap-chart-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wap-chart-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wap-chart-label {
    width: 100px;
    font-size: 13px;
    color: #4b5563;
}

.wap-chart-track {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.wap-chart-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.wap-chart-value {
    width: 40px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* ========================================
   EMBED BADGE (PREMIUM)
   ======================================== */
.wap-embed-badge-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: none;
}

.wap-embed-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    transition: all 0.2s;
    min-width: 280px;
}

.wap-embed-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Light Theme */
.wap-embed-badge.light {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

/* Dark Theme */
.wap-embed-badge.dark {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    color: #f9fafb;
}

.wap-embed-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.wap-embed-info {
    flex: 1;
}

.wap-embed-title {
    font-weight: 700;
    font-size: 14px;
    margin: 0;
}

.wap-embed-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-top: 4px;
}

.wap-embed-source img {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.light .wap-embed-source {
    color: #6b7280;
}

.dark .wap-embed-source {
    color: #9ca3af;
}

.wap-embed-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
}

.wap-embed-rank.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #7c2d12;
}

.wap-embed-rank.rank-2 {
    background: linear-gradient(135deg, #e5e7eb, #a8a8a8);
    color: #374151;
}

.wap-embed-rank.rank-3 {
    background: linear-gradient(135deg, #fcd9bd, #cd7f32);
    color: #7c2d12;
}

.wap-embed-rank.rank-4 {
    background: #dbeafe;
    color: #1e40af;
}

.wap-embed-rank.featured {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 10px;
}

/* ========================================
   LISTICLE STYLES
   ======================================== */
.wap-listicle {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wap-listicle.layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.wap-listicle.layout-compact .wap-tool-card {
    padding: 12px;
}

/* ========================================
   COMPARISON TABLE
   ======================================== */
.wap-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.wap-comparison-table th,
.wap-comparison-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.wap-comparison-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.wap-comparison-table .wap-feature-name {
    text-align: left;
    font-weight: 500;
    color: #4b5563;
}

.wap-comparison-table .wap-check {
    color: #10b981;
    font-size: 18px;
}

.wap-comparison-table .wap-cross {
    color: #ef4444;
    font-size: 18px;
}

.wap-best-choice {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid #667eea;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .wap-tool-header {
        flex-wrap: wrap;
    }

    .wap-tool-pricing {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }

    .wap-tool-actions {
        width: 100%;
        margin-top: 10px;
        justify-content: flex-start;
    }

    .wap-features-list {
        grid-template-columns: 1fr;
    }

    .wap-pros-cons {
        grid-template-columns: 1fr;
    }

    .wap-listicle.layout-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   VIDEO SHOWCASE WIDGET
   ======================================== */
.wap-video-showcase {
    position: relative;
    width: 100%;
}

.wap-video-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.wap-video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.wap-aspect-4-3 .wap-video-thumbnail {
    padding-top: 75%;
}

.wap-aspect-1-1 .wap-video-thumbnail {
    padding-top: 100%;
}

.wap-aspect-9-16 .wap-video-thumbnail {
    padding-top: 177.78%;
}

.wap-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wap-video-embed iframe,
.wap-video-embed video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Play Button Styles */
.wap-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.wap-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.wap-play-button svg {
    width: 100%;
    height: 100%;
}

.wap-play-youtube svg {
    width: 68px;
    height: 48px;
}

/* ========================================
   DEVICE MOCKUPS
   ======================================== */
.wap-device-frame {
    position: relative;
    margin: 0 auto;
}

/* iPhone Mockup */
.wap-iphone {
    width: 280px;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 0 0 3px #1a1a1a,
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.wap-iphone .wap-device-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    z-index: 20;
}

.wap-iphone .wap-device-screen {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
}

.wap-iphone .wap-video-thumbnail {
    padding-top: 216.67%;
    /* iPhone aspect ratio */
}

.wap-iphone .wap-device-home-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    z-index: 20;
}

/* iPad Mockup */
.wap-ipad {
    width: 400px;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.wap-ipad .wap-device-camera {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    z-index: 20;
}

.wap-ipad .wap-device-screen {
    border-radius: 12px;
    overflow: hidden;
}

/* MacBook Mockup */
.wap-macbook {
    width: 100%;
    max-width: 600px;
}

.wap-macbook-lid {
    background: linear-gradient(145deg, #8a8a8a, #6d6d6d);
    border-radius: 16px 16px 0 0;
    padding: 8px 8px 0;
    position: relative;
}

.wap-macbook .wap-device-camera {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    z-index: 20;
}

.wap-macbook .wap-device-screen {
    background: #000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.wap-macbook-base {
    height: 16px;
    background: linear-gradient(to bottom, #c0c0c0, #a0a0a0);
    border-radius: 0 0 8px 8px;
    position: relative;
}

.wap-macbook-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #888;
    border-radius: 0 0 4px 4px;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.wap-lightbox-trigger {
    cursor: pointer;
}

.wap-lightbox-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    min-height: 300px;
}

.wap-lightbox-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.wap-lightbox-content h4 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
}

.wap-lightbox-content p {
    margin: 0;
    opacity: 0.9;
}

.wap-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wap-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.wap-lightbox-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    z-index: 1;
}

.wap-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}

.wap-lightbox-video {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.wap-lightbox-video iframe,
.wap-lightbox-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   FLOATING PLAYER
   ======================================== */
.wap-floating-video {
    position: fixed;
    z-index: 9999;
    width: 300px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.wap-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.wap-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.wap-position-top-right {
    top: 20px;
    right: 20px;
}

.wap-position-top-left {
    top: 20px;
    left: 20px;
}

.wap-floating-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.wap-floating-video .wap-video-thumbnail {
    padding-top: 56.25%;
}

/* ========================================
   DISCLOSURE BOX
   ======================================== */
.wap-disclosure {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 13px;
    color: #92400e;
}

.wap-disclosure strong {
    display: block;
    margin-bottom: 4px;
}