/* net2phone Brand Colors */
:root {
    --brand-dark-blue: #002540;
    --brand-white: #FFFFFF;
    --brand-jet-black: #0E1112;
    --brand-gradient-primary-start: #002540;
    --brand-gradient-primary-end: #004D73;
    --brand-gradient-secondary-start: #E8F4F8;
    --brand-gradient-secondary-end: #F0F8FA;
    --neutral-light: #F5F7FA;
    --neutral-medium: #E5E8EB;
    --neutral-dark: #8B95A6;
}

/* IDT Sans Font - Fallback to system fonts if not available */
@font-face {
    font-family: 'IDT Sans';
    src: local('IDT Sans Regular'), local('IDT Sans');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'IDT Sans';
    src: local('IDT Sans Medium'), local('IDT Sans');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'IDT Sans';
    src: local('IDT Sans Bold'), local('IDT Sans');
    font-weight: 600;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IDT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #E8F4F8 0%, #D0E8F0 50%, #F0F8FA 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--brand-dark-blue);
}

.container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.chat-container {
    background: var(--brand-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 37, 64, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--brand-gradient-primary-start) 0%, var(--brand-gradient-primary-end) 100%);
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 37, 64, 0.95) 0%, rgba(0, 77, 115, 0.95) 50%, rgba(0, 102, 153, 0.95) 100%);
    z-index: 0;
}

.chat-header h1,
.chat-header .progress-bar,
.chat-header .progress-text,
.chat-header .header-top-row {
    position: relative;
    z-index: 1;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    width: 100%;
}

.header-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.header-logo {
    height: 40px;
    width: auto;
    max-width: 250px;
    display: block;
    object-fit: contain;
    background: transparent;
}

.start-again-button {
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--brand-white);
    font-size: 13px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.start-again-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.7);
}

.chat-header h1 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
    font-family: 'IDT Sans', sans-serif;
    color: var(--brand-white);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--brand-white);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 400;
    color: var(--brand-white);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--brand-white);
}

/* No Link Error Message Styles */
.no-link-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-white);
    z-index: 10;
}

.no-link-content {
    text-align: center;
    padding: 40px;
    max-width: 500px;
}

.no-link-logo {
    height: 50px;
    width: auto;
    max-width: 300px;
    margin-bottom: 30px;
}

.no-link-content h2 {
    color: var(--brand-dark-blue);
    font-family: 'IDT Sans', sans-serif;
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 20px;
}

.no-link-content p {
    color: var(--neutral-dark);
    font-family: 'IDT Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.message {
    display: flex;
    animation: fadeIn 0.3s ease;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
}

.user-message {
    justify-content: flex-end;
    align-items: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    font-family: 'IDT Sans', sans-serif;
}

.bot-message .message-content {
    background: var(--neutral-light);
    color: var(--brand-dark-blue);
    border-bottom-left-radius: 4px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Question block for bot messages with options */
.question-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.question-block .message-content {
    margin-bottom: 0;
    padding-bottom: 16px;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 500;
}

.user-message .message-content {
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0;
    line-height: 1.6;
    font-size: inherit;
    color: inherit;
}

/* Question text should be larger and more prominent */
.question-block .message-content p {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 500;
}

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 5px 0;
}

.chat-input-container {
    display: flex;
    padding: 20px;
    border-top: 1px solid var(--neutral-medium);
    gap: 10px;
    background: var(--brand-white);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--neutral-medium);
    border-radius: 25px;
    font-size: 14px;
    font-family: 'IDT Sans', sans-serif;
    color: var(--brand-dark-blue);
    outline: none;
    transition: border-color 0.3s;
    background: var(--brand-white);
}

.chat-input:focus {
    border-color: var(--brand-dark-blue);
}

.chat-input:disabled {
    background: var(--neutral-light);
    cursor: not-allowed;
    color: var(--neutral-dark);
}

.chat-input::placeholder {
    color: var(--neutral-dark);
}

.send-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0, 37, 64, 0.3);
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    opacity: 0.9;
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    color: var(--neutral-dark);
    font-size: 14px;
    font-family: 'IDT Sans', sans-serif;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--neutral-light);
    border-top: 3px solid var(--brand-dark-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.completion-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--brand-dark-blue);
    font-size: 18px;
    font-weight: 500;
    font-family: 'IDT Sans', sans-serif;
}

.completion-message .completion-thanks {
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 600;
}

.completion-message .summary-section {
    text-align: left;
    margin-top: 40px;
    padding: 30px;
    background: rgba(0, 37, 64, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--brand-dark-blue);
}

.completion-message .summary-section h3 {
    color: var(--brand-dark-blue);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'IDT Sans', sans-serif;
}

.completion-message .summary-content {
    color: var(--brand-dark-blue);
    font-size: 16px;
    line-height: 1.6;
    font-family: 'IDT Sans', sans-serif;
}

/* Typing Indicator */
.typing-indicator {
    opacity: 0.7;
}

.typing-content {
    padding: 12px 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neutral-dark);
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Option Buttons */
.options-container {
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 0 0 4px 0;
    box-sizing: border-box;
}

.selection-counter {
    font-size: 13px;
    color: var(--neutral-dark);
    font-family: 'IDT Sans', sans-serif;
    font-weight: 400;
    margin-bottom: 4px;
    padding: 0 4px;
}

.option-done-button {
    margin-top: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    font-size: 15px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 37, 64, 0.2);
    min-width: 100px;
}

.option-done-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 37, 64, 0.3);
    opacity: 0.9;
}

.option-done-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--neutral-medium);
}

.option-button {
    padding: 14px 20px;
    border: 2px solid var(--neutral-medium);
    border-radius: 8px;
    background: var(--brand-white);
    color: var(--brand-dark-blue);
    font-size: 15px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.option-button:hover:not(:disabled) {
    border-color: var(--brand-dark-blue);
    background: var(--neutral-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 37, 64, 0.1);
}

.option-button.selected {
    border-color: var(--brand-dark-blue);
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 37, 64, 0.25);
    transform: translateY(-1px);
}

.option-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Greeting Start Button */
.greeting-button-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.greeting-start-button {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    font-size: 16px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 37, 64, 0.25);
}

.greeting-start-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 37, 64, 0.3);
    opacity: 0.9;
}

.greeting-start-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.option-submit-button {
    margin-top: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    font-size: 14px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 37, 64, 0.2);
}

.option-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 37, 64, 0.3);
    opacity: 0.9;
}

.option-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Other Input Container */
.other-input-container {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.other-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--neutral-medium);
    border-radius: 12px;
    font-size: 14px;
    font-family: 'IDT Sans', sans-serif;
    color: var(--brand-dark-blue);
    background: var(--brand-white);
    outline: none;
    transition: border-color 0.2s;
}

.other-input:focus {
    border-color: var(--brand-dark-blue);
}

.other-submit-button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    font-size: 14px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 37, 64, 0.2);
}

.other-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 37, 64, 0.3);
    opacity: 0.9;
}

/* Admin Dashboard Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #E8F4F8 0%, #D0E8F0 50%, #F0F8FA 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.admin-header {
    background: var(--brand-white);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 37, 64, 0.1);
}

.admin-header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-logo {
    height: 40px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

.admin-header h1 {
    color: var(--brand-dark-blue);
    margin: 0;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 600;
    font-size: 28px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--brand-white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 37, 64, 0.1);
}

.stat-card h3 {
    color: var(--neutral-dark);
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 400;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 600;
    color: var(--brand-dark-blue);
    font-family: 'IDT Sans', sans-serif;
}

.admin-controls {
    background: var(--brand-white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 37, 64, 0.1);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'IDT Sans', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #002540 0%, #004D73 50%, #006699 100%);
    color: var(--brand-white);
    box-shadow: 0 2px 8px rgba(0, 37, 64, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 37, 64, 0.3);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--neutral-light);
    color: var(--brand-dark-blue);
    border: 2px solid var(--neutral-medium);
}

.btn-secondary:hover {
    background: var(--neutral-medium);
    border-color: var(--brand-dark-blue);
}

.responses-table {
    background: var(--brand-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 37, 64, 0.1);
}

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

th {
    background: var(--neutral-light);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--brand-dark-blue);
    border-bottom: 2px solid var(--neutral-medium);
    font-family: 'IDT Sans', sans-serif;
    font-size: 14px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--neutral-light);
    color: var(--brand-dark-blue);
    font-family: 'IDT Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
}

tr:hover {
    background: var(--neutral-light);
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--neutral-medium);
    border-radius: 5px;
    font-size: 14px;
    font-family: 'IDT Sans', sans-serif;
    color: var(--brand-dark-blue);
    flex: 1;
    min-width: 200px;
    background: var(--brand-white);
}

.filter-input:focus {
    outline: none;
    border-color: var(--brand-dark-blue);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-container {
        height: 100vh;
        border-radius: 0;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .options-container {
        gap: 8px;
    }
    
    .option-button {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .option-submit-button {
        width: 100%;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-controls {
        flex-direction: column;
    }
    
    .filter-input {
        width: 100%;
    }
}
