/*
Theme Name: JB Affiliate Bot
Theme URI: https://jonathanbigotta.it/
Description: Tema WordPress per JB Affiliate Bot - Sistema di pubblicazione automatica Instagram con interfaccia web completa. Include gestione carousel, template personalizzati, 10 nicchie di business e sistema di affiliazione.
Author: Jonathan Bigotta
Author URI: https://jonathanbigotta.it/
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jb-affiliate-bot
Tags: custom, instagram, bot, affiliate, marketing, automation
*/

/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Stili globali per tutto il tema */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Background gradient quando presente lo shortcode o pagina bot */
body.jb-bot-page,
body:has(.jb-bot-container),
.page-template-page-bot-interface .site {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh;
}

/* Nascondi header/footer su pagina bot se necessario */
.page-template-page-bot-interface .site-header,
.page-template-page-bot-interface .site-footer {
    display: none;
}

.page-template-page-bot-interface #page {
    margin: 0;
    padding: 0;
}

.page-template-page-bot-interface .site-main {
    margin: 0;
    padding: 0;
}

.jb-bot-container {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    margin: 20px auto;
    max-width: 1400px;
}

/* Assicura che il container sia visibile anche se dentro WordPress */
.jb-bot-container,
.wp-block-group.has-jb-bot-container {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
    backdrop-filter: blur(10px) !important;
}

.jb-bot-header {
    text-align: center;
    margin-bottom: 40px;
}

.jb-bot-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.jb-bot-header p {
    font-size: 1.1rem;
    color: #6c757d;
}

.config-section {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 30px 0;
}

.preview-box {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
}

.instagram-preview {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.instagram-preview img {
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
}

.instagram-preview img:hover {
    transform: scale(1.02);
}

.niche-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.niche-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.niche-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.niche-card.selected h6,
.niche-card.selected small {
    color: white !important;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-active {
    background: #28a745;
}

.status-inactive {
    background: #dc3545;
}

.btn-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: white;
}

/* Stili aggiuntivi per compatibilità con interfaccia originale */
.main-container {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
    backdrop-filter: blur(10px) !important;
    padding: 40px !important;
    margin: 20px auto !important;
    max-width: 1400px !important;
}

/* Assicura che il body abbia il background quando presente lo shortcode */
body:has(.main-container),
body:has(.jb-bot-container) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh !important;
}

/* Override per elementi WordPress che interferiscono */
.jb-bot-container .card,
.main-container .card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jb-bot-container .form-control,
.main-container .form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
}

.jb-bot-container .btn,
.main-container .btn {
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .jb-bot-container,
    .main-container {
        padding: 20px !important;
        margin: 10px !important;
    }
    
    .jb-bot-header h1,
    .main-container h1 {
        font-size: 2rem !important;
    }
}

