/* Canada Craves - Main Stylesheet */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e63946;
    text-decoration: none;
}

.logo span {
    color: #1d3557;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #e63946;
}

.nav-buttons a {
    margin-left: 1rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #e63946;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #d62828;
}

.btn-secondary {
    background-color: #1d3557;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #14213d;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #1d3557 0%, #457b9d 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    margin: 0 0.5rem;
}

/* Features section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #1d3557;
}

/* Featured ads */
.featured-ads {
    margin: 3rem 0;
}

.featured-ads h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1d3557;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* CTA section */
.cta-section {
    text-align: center;
    padding: 3rem 0;
    background: #f1faee;
    border-radius: 8px;
    margin: 3rem 0;
}

.cta-section h2 {
    margin-bottom: 1rem;
    color: #1d3557;
}

/* Footer */
footer {
    background-color: #1d3557;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-links h3 {
    margin-bottom: 1rem;
    color: #a8dadc;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #f1faee;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #a8dadc;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #457b9d;
    color: #a8dadc;
}

/* Dashboard styles */
.page-header {
    margin: 2rem 0;
    text-align: center;
}

.page-header h1 {
    color: #1d3557;
    margin-bottom: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    margin-bottom: 1rem;
    color: #1d3557;
}

.company-info p,
.subscription-info p {
    margin-bottom: 0.5rem;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-actions a {
    display: block;
    text-align: center;
}

/* Ad cards */
.ad-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ad-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ad-header h3 {
    color: #1d3557;
    margin-bottom: 0.5rem;
}

.ad-province {
    background: #457b9d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.ad-content {
    padding: 1rem;
}

.ad-company {
    margin-top: 0.5rem;
    font-weight: 500;
    color: #457b9d;
}

.ad-footer {
    padding: 1rem;
    background: #f8f9fa;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.ad-actions {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

.btn-success {
    background-color: #2a9d8f;
    color: white;
}

.btn-success:hover {
    background-color: #227d71;
}

.btn-danger {
    background-color: #e63946;
    color: white;
}

.btn-danger:hover {
    background-color: #d62828;
}

.btn-warning {
    background-color: #e9c46a;
    color: #333;
}

.btn-warning:hover {
    background-color: #d4a74a;
}

/* Status badges */
.ad-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-approved {
    background: #2a9d8f;
    color: white;
}

.status-pending {
    background: #e9c46a;
    color: #333;
}

.status-draft {
    background: #6c757d;
    color: white;
}

.status-rejected {
    background: #e63946;
    color: white;
}

.status-paused {
    background: #6c757d;
    color: white;
}

.status-active {
    background: #2a9d8f;
    color: white;
}

.status-cancelled {
    background: #6c757d;
    color: white;
}

.status-verified {
    background: #2a9d8f;
    color: white;
}

/* Forms */
.form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #457b9d;
    box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.1);
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input,
.radio-label input {
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffccd5;
    color: #d62828;
    border: 1px solid #e63946;
}

.alert-success {
    background: #d8f3dc;
    color: #2a9d8f;
    border: 1px solid #2a9d8f;
}

.alert-info {
    background: #caf0f8;
    color: #0077b6;
    border: 1px solid #0077b6;
}

/* Auth pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #1d3557;
    margin-bottom: 0.5rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
}

.auth-footer a {
    color: #457b9d;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Actions bar */
.actions-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: #1d3557;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    color: #1d3557;
    border: 1px solid #ddd;
}

.pagination-link:hover {
    background: #f8f9fa;
}

.pagination-link.active {
    background: #1d3557;
    color: white;
    border-color: #1d3557;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    color: #1d3557;
    margin-bottom: 0.5rem;
}

/* Ad detail view */
.ad-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.ad-main {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ad-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-group {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.info-group label {
    font-weight: 500;
    color: #666;
}

.ad-description {
    margin: 2rem 0;
}

.ad-description h3 {
    margin-bottom: 1rem;
    color: #1d3557;
}

.ad-media {
    margin: 2rem 0;
}

.ad-media h3 {
    margin-bottom: 1rem;
    color: #1d3557;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.posting-status {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.platform-status-list {
    margin-top: 1rem;
}

.platform-status {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.platform-status:last-child {
    border-bottom: none;
}

.platform-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.platform-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.scheduled-date {
    font-size: 0.9rem;
    color: #666;
}

.attempts {
    font-size: 0.9rem;
    color: #666;
}

.error {
    font-size: 0.9rem;
    color: #e63946;
}

/* Admin styles */
.admin-header {
    background: #457b9d;
    color: white;
}

.admin-nav {
    display: flex;
    list-style: none;
    padding: 1rem 0;
}

.admin-nav li {
    margin-right: 1.5rem;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: #a8dadc;
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

/* Analytics dashboard */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.analytics-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.analytics-card h3 {
    margin-bottom: 1rem;
    color: #1d3557;
}

.provinces-list,
.platforms-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.province-item,
.platform-item {
    padding: 0.75rem;
    border-radius: 4px;
    background: #f8f9fa;
}

.province-name,
.platform-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.province-metrics,
.platform-metrics {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.monthly-chart {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

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

/* Legal pages */
.legal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.legal-content h2 {
    margin: 1.5rem 0 1rem;
    color: #1d3557;
}

.legal-content h3 {
    margin: 1rem 0 0.5rem;
    color: #457b9d;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-detail {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Spinner for loading states */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #1d3557;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Plans grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.plan-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-card.plan-current {
    border: 2px solid #e63946;
}

.plan-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.plan-header h3 {
    color: #1d3557;
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 2rem;
    font-weight: bold;
    color: #e63946;
    margin-bottom: 1rem;
}

.plan-price span {
    font-size: 1rem;
    color: #666;
}

.plan-features {
    padding: 1.5rem;
    list-style: none;
}

.plan-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: center;
}

.plan-features li:before {
    content: "✓";
    color: #2a9d8f;
    font-weight: bold;
    margin-right: 0.5rem;
}

.plan-actions {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Plan comparison table */
.plan-comparison {
    margin: 3rem 0;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid #eee;
}

.comparison-table th {
    background: #1d3557;
    color: white;
}

.comparison-table td {
    background: #f8f9fa;
}

.check {
    color: #2a9d8f;
    font-weight: bold;
}

.cross {
    color: #e63946;
    font-weight: bold;
}

/* Social connections */
.social-connections {
    margin: 2rem 0;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.platform-card {
    text-decoration: none;
    color: #333;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.platform-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

.platform-name {
    font-weight: 500;
}

.connected-accounts {
    margin: 3rem 0;
}

.account-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.account-info {
    flex: 1;
}

.account-platform {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.account-id,
.account-date {
    font-size: 0.9rem;
    color: #666;
}

.account-actions {
    margin-left: 1rem;
}