/* InstaTree Frontend Styles */

:root {
    --instatree-bg: #ffffff;
    --instatree-text: #1d2327;
    --instatree-link-bg: #f0f0f1;
    --instatree-link-hover: #e0e0e1;
    --instatree-primary: #0066cc;
    --instatree-border: #c3c4c7;
}

.instatree-fallback {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: var(--instatree-bg);
    color: var(--instatree-text);
    min-height: 100vh;
    padding: 20px;
}

.instatree-fallback.dark {
    --instatree-bg: #1d2327;
    --instatree-text: #f0f0f1;
    --instatree-link-bg: #2c3338;
    --instatree-link-hover: #3c4348;
}

.instatree-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.instatree-header {
    text-align: center;
    margin-bottom: 40px;
}

.instatree-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--instatree-primary);
}

.instatree-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--instatree-text);
}

.instatree-bio {
    font-size: 16px;
    line-height: 1.6;
    color: var(--instatree-text);
    opacity: 0.8;
    margin: 10px 0;
}

/* Links */
.instatree-links {
    margin: 30px 0;
}

.instatree-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    margin-bottom: 15px;
    background: var(--instatree-link-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    color: var(--instatree-text);
    transition: all 0.3s ease;
    cursor: pointer;
}

.instatree-link:hover {
    background: var(--instatree-link-hover);
    border-color: var(--instatree-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.instatree-link.highlight {
    background: var(--instatree-primary);
    color: #ffffff;
    font-weight: 600;
}

.instatree-link.highlight:hover {
    background: #0052a3;
}

.link-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.link-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.link-content {
    flex: 1;
}

.link-title {
    font-size: 16px;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
}

.link-price {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

.link-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
}

/* Video Embeds */
.video-embed {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.video-embed iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* Footer */
.instatree-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--instatree-border);
}

.instatree-branding {
    font-size: 13px;
    color: var(--instatree-text);
    opacity: 0.6;
}

.instatree-branding a {
    color: var(--instatree-primary);
    text-decoration: none;
    font-weight: 600;
}

.instatree-qr {
    text-align: center;
    margin-top: 30px;
}

.qr-code {
    max-width: 150px;
    height: auto;
}

.privacy-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 12px;
    color: var(--instatree-text);
    opacity: 0.6;
    text-decoration: none;
}

/* Consent Banner */
.instatree-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 20px;
    text-align: center;
    z-index: 9999;
}

.instatree-consent-banner button {
    background: var(--instatree-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.instatree-consent-banner button:hover {
    background: #0052a3;
}

/* Responsive */
@media (max-width: 600px) {
    .instatree-container {
        padding: 20px 15px;
    }
    
    .instatree-avatar {
        width: 100px;
        height: 100px;
    }
    
    .instatree-name {
        font-size: 24px;
    }
    
    .instatree-link {
        padding: 14px 16px;
    }
    
    .video-embed iframe {
        height: 200px;
    }
}

/* Mobile First */
@media (prefers-color-scheme: dark) {
    .instatree-fallback:not(.light) {
        --instatree-bg: #1d2327;
        --instatree-text: #f0f0f1;
        --instatree-link-bg: #2c3338;
        --instatree-link-hover: #3c4348;
    }
}
