/* Main Stylesheet - Mobile Responsive Version */

/* ============================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================ */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #f39c12;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --border-color: #ddd;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --dark-bg: #2c3e50;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Mobile: Full width with padding */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Mobile typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

p {
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: #666;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
}

.btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--light-bg);
    text-decoration: none;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.125rem;
}

/* Mobile buttons - full width on small screens */
@media (max-width: 480px) {
    .btn {
        width: 100%;
        display: block;
        margin-bottom: 10px;
    }
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control-file {
    display: block;
    margin-top: 5px;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-row {
    display: flex;
    margin-right: -10px;
    margin-left: -10px;
    flex-wrap: wrap;
}

.form-row>.form-group {
    padding-right: 10px;
    padding-left: 10px;
    flex: 1;
    min-width: 200px;
}

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

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid var(--success-color);
    color: #27ae60;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--error-color);
    color: #c0392b;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo img {
    max-height: 50px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
}

nav ul li a.active,
nav ul li a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        display: none;
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding-top: 70px;
    }

    nav.active {
        display: block;
        right: 0;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
    }

    nav ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    nav ul li a {
        display: block;
        padding: 15px 10px;
        font-size: 16px;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.hero .container {
    display: flex;
    align-items: center;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #555;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
}

/* Mobile Hero */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }

    .hero-content {
        padding-right: 0;
        padding-bottom: 40px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
    padding: 80px 0;
    background-color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 10px;
}

/* Mobile Features */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features {
        padding: 40px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRICING SECTION
   ============================================ */
.pricing {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.pricing-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.plan-name {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 15px 0;
}

.plan-duration {
    color: #666;
    margin-bottom: 20px;
}

.plan-features {
    margin-bottom: 25px;
}

.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.payment-methods {
    text-align: center;
}

.payment-logos {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.payment-logos img {
    height: 40px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.payment-logos img:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Mobile Pricing */
@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pricing {
        padding: 40px 0;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials {
    padding: 80px 0;
    background-color: #fff;
}

.testimonial-slider {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.testimonial-item {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 350px;
    flex: 1;
    min-width: 280px;
}

.testimonial-content {
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
}

.author-company {
    color: #666;
    font-size: 0.875rem;
}

/* Mobile Testimonials */
@media (max-width: 768px) {
    .testimonials {
        padding: 40px 0;
    }
}

/* ============================================
   CALL TO ACTION
   ============================================ */
.cta {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn-primary {
    background-color: #fff;
    color: var(--primary-color);
}

.cta .btn-primary:hover {
    background-color: var(--light-bg);
}

/* Mobile CTA */
@media (max-width: 768px) {
    .cta {
        padding: 40px 0;
    }

    .cta h2 {
        font-size: 2rem;
    }

    .cta p {
        font-size: 1rem;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo img {
    max-height: 50px;
    margin-bottom: 15px;
}

.footer-column h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: #bdc3c7;
    font-size: 0.875rem;
}

.payment-methods img {
    height: 20px;
    margin-left: 10px;
}

/* Mobile Footer */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */
.dashboard-container {
    padding: 40px 0;
}

.dashboard-welcome {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.subscription-status {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.subscription-status.active {
    background-color: rgba(46, 204, 113, 0.1);
}

.subscription-status.inactive {
    background-color: rgba(231, 76, 60, 0.1);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
}

.active .status-indicator {
    background-color: var(--success-color);
}

.inactive .status-indicator {
    background-color: var(--error-color);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.stat-icon {
    font-size: 2rem;
    margin-right: 20px;
    color: var(--primary-color);
}

.stat-content {
    flex: 1;
}

.stat-title {
    color: #666;
    font-size: 0.875rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 5px 0;
}

.stat-subtitle {
    font-size: 0.75rem;
    color: #999;
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dashboard-card h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.code-container,
.api-key-container {
    position: relative;
    margin: 15px 0;
}

.embed-code,
.api-key {
    display: block;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.75rem;
}

.copy-btn.copied {
    background-color: var(--success-color);
}

.note {
    font-size: 0.875rem;
    color: #666;
    margin-top: 10px;
}

.message-list {
    max-height: 400px;
    overflow-y: auto;
}

.message-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.message-item.visitor {
    background-color: rgba(52, 152, 219, 0.1);
}

.message-item.agent {
    background-color: rgba(46, 204, 113, 0.1);
}

.message-item.unread {
    border-left: 3px solid var(--primary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.875rem;
}

.message-sender {
    font-weight: 600;
}

.message-time {
    color: #999;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 30px 0;
}

.view-all {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: var(--light-bg);
    border-radius: 4px;
    margin-top: 15px;
}

.visitors-table {
    width: 100%;
    border-collapse: collapse;
}

.visitors-table th,
.visitors-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.visitors-table thead th {
    background-color: var(--light-bg);
    font-weight: 600;
}

.visitors-table tbody tr:hover {
    background-color: var(--light-bg);
}

.visitor-info {
    display: flex;
    flex-direction: column;
}

.visitor-name {
    font-weight: 600;
}

.visitor-email {
    font-size: 0.875rem;
    color: #666;
}

.visitor-url {
    font-size: 0.875rem;
    word-break: break-all;
}

/* Mobile Dashboard */
@media (max-width: 992px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .visitors-table {
        display: none;
    }

    /* Show cards on mobile instead of table */
    .visitor-card {
        background-color: #fff;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-container {
    padding: 40px 0;
}

.admin-actions {
    margin-bottom: 30px;
}

.filter-form {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table thead th {
    background-color: var(--light-bg);
    font-weight: 600;
}

.data-table tbody tr:hover {
    background-color: var(--light-bg);
}

.status-pending {
    color: #f39c12;
}

.status-completed {
    color: var(--success-color);
}

.status-failed {
    color: var(--error-color);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination a:hover {
    background-color: var(--light-bg);
    text-decoration: none;
}

.pagination .current {
    background-color: var(--primary-color);
    color: #fff;
}

/* Mobile Admin */
@media (max-width: 768px) {
    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {

    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }

    /* Show only on mobile */
    .show-mobile {
        display: block !important;
    }
}

@media (min-width: 769px) {

    /* Hide on desktop */
    .hide-desktop {
        display: none !important;
    }
}