/* Marketing AI Advisor CSS */

/* Loader animato per generazione AI */
.ai-loader {
    padding: 20px;
    background-color: rgba(249, 249, 249, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.ai-loader .spinner-grow {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 5px;
    animation-duration: 1.5s;
}

.ai-loader .spinner-grow:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-loader .spinner-grow:nth-child(3) {
    animation-delay: 0.4s;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Dashboard & Admin Layout */
body {
    font-size: .875rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.feather {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100; /* Behind the navbar */
    padding: 48px 0 0; /* Height of navbar */
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 1rem;
}

.sidebar .nav-link .feather {
    margin-right: 4px;
    color: #727272;
}

.sidebar .nav-link.active {
    color: #2470dc;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
    color: inherit;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Navbar */
.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, .25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .navbar-toggler {
    top: .25rem;
    right: 1rem;
}

/* Content */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.card-body {
    flex: 1 1 auto;
    min-height: 1px;
    padding: 1.25rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Login / Register */
.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
}

.form-check-input {
    position: relative;
    margin-top: .3rem;
}

/* Google Ads Preview */
.ad-preview {
    font-family: Arial, sans-serif;
    margin-bottom: 15px;
}

.ad-url {
    color: #00823c;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 4px;
}

.ad-title {
    color: #1a0dab;
    font-size: 18px;
    margin: 0;
    font-weight: normal;
    text-decoration: none;
    display: block;
}

.ad-description {
    color: #545454;
    font-size: 14px;
    line-height: 1.4;
}

/* Header Dropdown Fix */
.navbar .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1050 !important;
    margin-top: 0.5rem;
}

.navbar .dropdown {
    position: relative;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
}