/* =========================================
   WHATSAPP GENERATOR - COMPLETE CSS
   ========================================= */

:root {
    --primary: #25D366;
    --primary-dark: #128C7E;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --white: #ffffff;
    --bg-light: #F9FAFB;
}

/* =========================================
   MAIN GENERATOR CARD
   ========================================= */
.gen-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 40px auto;
    position: relative;
    z-index: 10;
    border: 1px solid #e5e7eb;
    max-width: 1000px;
}

/* =========================================
   TWO-COLUMN LAYOUT
   ========================================= */
.generator-layout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 850px) {
    .generator-layout-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }

    .input-column {
        flex: 1;
        min-width: 0;
    }

    .preview-column {
        flex: 0 0 240px;
        position: sticky;
        top: 20px;
        display: flex;
        justify-content: center;
    }
}

/* =========================================
   PROGRESS STEPS
   ========================================= */
.top-progress-wrapper {
    max-width: 600px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
}

.progress-steps-row {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps-row::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.step-indicator {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-circle-ind {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e2e8f0;
    color: #cbd5e0;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    font-size: 18px;
}

.step-label-ind {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* PENDING STATE */
.step-indicator.pending .step-circle-ind {
    background: white;
    border-color: #e2e8f0;
    color: #cbd5e0;
}

.step-indicator.pending .step-label-ind {
    color: #a0aec0;
}

/* COMPLETED STATE */
.step-indicator.completed .step-circle-ind {
    background: white;
    border-color: #e2e8f0;
    color: #25D366;
}

.step-indicator.completed .step-label-ind {
    color: #25D366;
}

/* ACTIVE STATE */
.step-indicator.active .step-circle-ind {
    background: #25D366;
    border-color: #25D366;
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
    transform: scale(1.1);
}

.step-indicator.active .step-label-ind {
    color: #128C7E;
    font-weight: 800;
}

/* =========================================
   FORM INPUTS
   ========================================= */
.input-box {
    margin-bottom: 20px;
}

.input-box label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 14px;
}

.input-box input,
.input-box textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.input-box input:focus,
.input-box textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.input-box small {
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
    font-size: 12px;
}

/* =========================================
   ACTION BUTTONS
   ========================================= */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary {
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-secondary {
    background: #764ba2;
    color: white;
}

.btn-secondary:hover {
    background: #5a3a7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* =========================================
   WHATSAPP PHONE MOCKUP
   ========================================= */
.phone-container {
    width: 240px;
    height: 480px;
    background: #e5ddd5;
    border: 10px solid #111;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.phone-header {
    background: #075E54;
    color: white;
    padding: 30px 12px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.phone-header .profile-pic {
    width: 32px;
    height: 32px;
    background: #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.phone-header b {
    font-size: 13px;
    display: block;
    line-height: 1.2;
}

.phone-header span {
    display: block;
    font-size: 10px;
    opacity: 0.8;
}

.phone-chat-area {
    flex: 1;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: cover;
    background-position: center;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow-y: auto;
}

.message-bubble {
    background: #DCF8C6;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 12px;
    max-width: 85%;
    position: relative;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    margin-top: auto;
    word-wrap: break-word;
    align-self: flex-end;
    line-height: 1.4;
}

.message-bubble::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -7px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 8px 8px;
    border-color: transparent transparent #DCF8C6 transparent;
}

/* =========================================
   QR CODE MODAL
   ========================================= */
#qrModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#qrModal.show {
    display: flex;
}

.qr-modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    cursor: default;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f44336;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: #d32f2f;
    transform: rotate(90deg);
}

.qr-modal-content h2 {
    color: #25D366;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px auto;
    min-height: 200px;
}

#qrcode img {
    border: 5px solid #25D366;
    border-radius: 15px;
    padding: 15px;
    background: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

#modalLinkInput {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    background: #f9fafb;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    color: #333;
    margin-bottom: 15px;
}

#modalLinkInput:focus {
    outline: none;
    border-color: #25D366;
    background: white;
}

.copy-btn {
    width: 100%;
    padding: 14px 24px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

/* =========================================
   FAQ SECTION
   ========================================= */
.faq-section {
    margin: 60px 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-main);
    font-size: 2rem;
}

.faq-new-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-new-item {
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s;
}

.faq-new-question {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    user-select: none;
    color: var(--text-main);
}

.faq-new-question:hover {
    background: #f8fafc;
}

.faq-new-question span {
    font-size: 20px;
    transition: transform 0.3s;
}

.faq-new-item.open .faq-new-question span {
    transform: rotate(45deg);
}

.faq-new-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.faq-new-item.open .faq-new-answer {
    padding: 0 20px 20px 20px;
    max-height: 200px;
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 849px) {
    .gen-card {
        padding: 25px 15px;
        margin: 20px auto;
    }

    .generator-layout-wrapper {
        flex-direction: column;
        gap: 25px;
    }

    .preview-column {
        order: 2;
        margin-top: 15px;
    }

    .input-column {
        order: 1;
    }

    .action-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .phone-container {
        width: 220px;
        height: 440px;
        border-width: 8px;
    }

    .step-label-ind {
        font-size: 10px;
    }

    .progress-steps-row::before {
        left: 40px;
        right: 40px;
    }

    .step-circle-ind {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .qr-modal-content {
        padding: 30px 20px;
        width: 95%;
        max-width: none;
    }

    .qr-modal-content h2 {
        font-size: 20px;
    }

    #qrcode {
        min-height: 180px;
    }

    #qrcode img {
        max-width: 180px;
        padding: 10px;
        border-width: 3px;
    }

    #modalLinkInput {
        font-size: 12px;
        padding: 10px;
    }

    .copy-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .phone-container {
        width: 200px;
        height: 400px;
    }

    .phone-header {
        padding: 25px 10px 6px;
    }

    .gen-card {
        padding: 20px 10px;
    }

    .top-progress-wrapper {
        margin-bottom: 30px;
    }
}