/* assets/css/style.css */

:root {
    --primary-color: #00c65e;
    /* Bright Green like Convertte */
    --primary-hover: #00a850;
    --text-main: #333333;
    --text-secondary: #666666;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --input-bg: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --font-family: 'Roboto', sans-serif;
    --wa-bg-color: #e5ddd5;
    --wa-bubble-out: #dcf8c6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
}

/* Layout */
.main-wrapper {
    flex: 1;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Generator Grid */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: start;
}

/* Left Column: Form */
.form-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.phone-input-group {
    display: flex;
    gap: 10px;
}

.ddi-select {
    width: 110px;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
}

input[type="tel"],
input[type="email"],
textarea,
input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s;
    background: var(--input-bg);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 198, 94, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 198, 94, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: #f9f9f9;
}

.btn-success {
    background: #25D366;
    color: white;
}

.btn-success:hover {
    background: #128C7E;
}

/* Templates Section */
.templates-section {
    margin-top: 1rem;
}

.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.templates-header h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.templates-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.template-card:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.template-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

.template-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Right Column: Preview */
.preview-column {
    position: sticky;
    top: 100px;
}

.whatsapp-preview {
    background-color: var(--wa-bg-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 8px solid #fff;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    /* WhatsApp Doodle BG */
    background-size: 300px;
}

.wa-header {
    background: #075e54;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.wa-avatar {
    width: 40px;
    height: 40px;
    background: #ccc;
    border-radius: 50%;
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/7/7c/Profile_avatar_placeholder_large.png');
    background-size: cover;
}

.wa-info {
    display: flex;
    flex-direction: column;
}

.wa-name {
    font-weight: 600;
    font-size: 1rem;
}

.wa-status {
    font-size: 0.75rem;
    opacity: 0.8;
}

.wa-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
}

.wa-message-bubble {
    background: var(--wa-bubble-out);
    padding: 0.8rem 1rem;
    border-radius: 8px 0 8px 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 85%;
    position: relative;
    font-size: 0.95rem;
    color: #303030;
    word-wrap: break-word;
}

.wa-message-bubble::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid var(--wa-bubble-out);
    border-right: 8px solid transparent;
}

.wa-time {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
}

/* Result Area */
.result-area {
    animation: fadeIn 0.3s ease;
}

.result-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.result-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.link-display {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.link-display input {
    background: #f9f9f9;
    color: #555;
    font-size: 0.9rem;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    padding: 0 1.5rem;
}

.qrcode-box {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.qrcode-box img,
.qrcode-box canvas {
    border: 5px solid white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none;
}

/* Usage Section */
.usage-section {
    margin-bottom: 4rem;
}

.usage-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.usage-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    text-align: center;
    transition: transform 0.3s ease;
}

.usage-card:hover {
    transform: translateY(-5px);
}

.usage-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* SEO Content */
.seo-content {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin-bottom: 3rem;
}

.seo-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.benefit-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-icon {
    color: var(--primary-color);
    font-weight: bold;
}

/* FAQ */
.faq-section {
    margin-bottom: 4rem;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.faq-item details {
    padding: 1.5rem;
    cursor: pointer;
}

.faq-item summary {
    font-weight: 600;
    list-style: none;
    position: relative;
}

.faq-item p {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: white;
    border-top: 1px solid var(--border-color);
    color: #888;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 900px) {
    .generator-grid {
        grid-template-columns: 1fr;
    }

    .preview-column {
        position: static;
        order: -1;
        /* Preview on top on mobile? Or bottom? Let's keep it bottom for now or standard flow */
        order: 1;
    }

    .secondary-actions {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}