/* WhatsApp CRM Lead Logger - Frontend Styles */

:root {
    --wcrm-primary: #25d366;
    --wcrm-primary-dark: #20ba5a;
    --wcrm-text-light: #f5f5f5;
    --wcrm-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.wcrm-button-container {
    position: fixed;
    z-index: 999999;
    bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.wcrm-button-container.wcrm-bottom-right {
    right: 20px;
}

.wcrm-button-container.wcrm-bottom-left {
    left: 20px;
}

.wcrm-button-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tooltip */
.wcrm-tooltip {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: var(--wcrm-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.wcrm-button-container.wcrm-bottom-left .wcrm-tooltip {
    right: auto;
    left: 0;
}

.wcrm-button-wrapper:hover .wcrm-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

/* Button */
.wcrm-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--wcrm-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--wcrm-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 24px;
    flex-shrink: 0;
    animation: wcrm-pulse 2s infinite;
}

.wcrm-shortcode-inline {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.wcrm-button-inline {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 12px 20px !important;
    border-radius: 999px;
    gap: 8px;
    animation: none;
    font-size: 14px;
    font-weight: 600;
}

.wcrm-button-inline .wcrm-btn-icon {
    width: 20px;
    height: 20px;
}

.wcrm-shortcode-text {
    font-weight: 600;
}

.wcrm-button-inline.wcrm-button-no-bg {
    padding: 8px !important;
    background: transparent !important;
}

.wcrm-button .wcrm-btn-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.wcrm-button-no-bg {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    width: auto;
    height: auto;
    padding: 0 !important;
    border-radius: 0 !important;
    animation: none !important;
}

.wcrm-button-no-bg .wcrm-btn-icon {
    width: 60px;
    height: 60px;
    transition: opacity 0.3s ease;
}

.wcrm-button-no-bg:hover {
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
}

.wcrm-button-no-bg:hover .wcrm-btn-icon {
    opacity: 0.85;
}

.wcrm-button:hover {
    background: var(--wcrm-primary-dark);
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.wcrm-button:active {
    transform: scale(0.95);
}

@keyframes wcrm-pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 5px 30px rgba(37, 211, 102, 0.3);
    }
}

/* Modal Dialog */
.wcrm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    justify-content: center;
    align-items: center;
}

.wcrm-modal.show {
    display: flex;
}

.wcrm-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: wcrm-slideUp 0.3s ease;
}

@keyframes wcrm-slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wcrm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.wcrm-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.wcrm-page-indicator {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.wcrm-modal-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.wcrm-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.wcrm-modal-close:hover {
    color: #333;
}

/* Form Styles */
.wcrm-form-section {
    display: block;
}

.wcrm-form-section.hidden {
    display: none;
}

.wcrm-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: space-between;
}

.wcrm-submit-btn,
.wcrm-btn-prev,
.wcrm-btn-next {
    flex: 1;
    padding: 12px;
    background: var(--wcrm-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wcrm-btn-prev,
.wcrm-btn-next {
    font-size: 14px;
    padding: 10px;
    flex: 0 1 auto;
}

.wcrm-submit-btn:hover,
.wcrm-btn-prev:hover,
.wcrm-btn-next:hover {
    background: var(--wcrm-primary-dark);
}

.wcrm-submit-btn:disabled,
.wcrm-btn-prev:disabled,
.wcrm-btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.wcrm-form-group {
    margin-bottom: 20px;
}

.wcrm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.wcrm-form-group input,
.wcrm-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

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

.wcrm-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Styles */
.wcrm-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Success Message */
.wcrm-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.wcrm-success-message svg {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 600px) {
    .wcrm-button-container {
        bottom: 15px;
    }

    .wcrm-button-container.wcrm-bottom-right {
        right: 15px;
    }

    .wcrm-button-container.wcrm-bottom-left {
        left: 15px;
    }

    .wcrm-button {
        width: 55px;
        height: 55px;
    }

    .wcrm-modal-content {
        padding: 20px;
    }

    .wcrm-tooltip {
        white-space: normal;
        max-width: 150px;
    }
}
