/**
 * Phone Plan Chatbot Enhanced Styles
 * 
 * Modern, clean styling for the phone plan chatbot interface
 * with additional styles for TCO calculator components
 */

/* Main container */
#ppc-chatbot {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
    background-color: #f8f8f8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Messages container */
#ppc-messages {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Welcome container */
.ppc-welcome {
    text-align: center;
    margin-bottom: 20px;
}

.ppc-welcome h2 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: normal;
    color: #555;
}

.ppc-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.ppc-logo-icon {
    background-color: #7c4dff;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 10px;
}

.ppc-logo-text {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.ppc-intro-text {
    font-size: 16px;
    color: #555;
    max-width: 800px;
    margin: 0 auto 10px;
    line-height: 1.5;
}

.ppc-secondary-text {
    font-size: 16px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Options for TCO calculator */
.ppc-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
    width: 100%;
    max-width: 400px;
}

.ppc-option {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ppc-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    background-color: #f8f8ff;
}

.ppc-option-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f0f8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.ppc-option-text {
    font-size: 15px;
    color: #333;
}

/* Custom input for numbers outside predefined options */
.ppc-custom-input {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    align-self: flex-start;
}

.ppc-line-input,
.ppc-phone-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    width: 140px;
}

.ppc-submit-btn {
    background-color: #5b6bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.ppc-submit-btn:hover {
    background-color: #4a57e8;
}

/* Example message boxes */
.ppc-examples {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 500px;
}

.ppc-example-box {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ppc-example-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ppc-example-icon {
    font-size: 24px;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppc-example-text {
    font-size: 16px;
    color: #333;
}

/* Individual message styling */
.ppc-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.ppc-message a {
    color: #2962ff;
    text-decoration: underline;
}

.ppc-bot {
    align-self: flex-start;
    background-color: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ppc-user {
    align-self: flex-end;
    background-color: #5b6bff;
    color: white;
    border-bottom-right-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Input area */
#ppc-input-container {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 10px 15px;
    border-top: 1px solid #eaeaea;
    position: relative;
}

#ppc-input {
    flex-grow: 1;
    border: none;
    padding: 12px 15px;
    border-radius: 20px;
    font-size: 15px;
    background-color: #f0f0f0;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    margin: 0 10px;
}

#ppc-input:focus {
    outline: none;
    background-color: #e8e8e8;
}

#ppc-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#ppc-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5b6bff;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    position: relative;
}

#ppc-send:hover:not(:disabled) {
    background-color: #4a57e8;
}

#ppc-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#ppc-send::before {
    content: "↑";
    transform: rotate(45deg);
    position: absolute;
}

/* Plus button */
.ppc-plus-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #666;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.ppc-plus-button:hover {
    background-color: #e0e0e0;
}

/* Loading indicator */
#ppc-loading {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: #666;
    padding: 8px 16px;
    border-radius: 18px;
    margin-bottom: 10px;
    font-size: 14px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Scroll to top button */
.ppc-scroll-button {
    position: absolute;
    right: 20px;
    bottom: 75px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: #666;
    border: 1px solid #eaeaea;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
    z-index: 10;
}

.ppc-scroll-button:hover {
    background-color: #f5f5f5;
}

/* TCO comparison table styling */
.ppc-tco-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.ppc-tco-table th,
.ppc-tco-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #eaeaea;
}

.ppc-tco-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.ppc-tco-table tr:nth-child(even) {
    background-color: #fafafa;
}

.ppc-tco-table .ppc-current {
    background-color: #ffebee;
}

.ppc-tco-table .ppc-budget {
    background-color: #e8f5e9;
}

.ppc-tco-table .ppc-mid {
    background-color: #e3f2fd;
}

.ppc-tco-table .ppc-premium {
    background-color: #ede7f6;
}

.ppc-savings {
    color: #43a047;
    font-weight: bold;
}

/* Responsive styles */
@media (max-width: 768px) {
    #ppc-chatbot {
        height: 80vh;
        max-width: 100%;
        border-radius: 0;
    }
    
    .ppc-message {
        max-width: 90%;
    }
    
    .ppc-intro-text, .ppc-secondary-text {
        font-size: 14px;
    }
    
    .ppc-logo-text {
        font-size: 28px;
    }
    
    .ppc-options,
    .ppc-examples {
        width: 100%;
        max-width: 100%;
    }
    
    .ppc-custom-input {
        flex-direction: column;
        width: 100%;
    }
    
    .ppc-line-input,
    .ppc-phone-input {
        width: 100%;
    }
}