:root {
    --primary-color: #E08442;
    --secondary-color: #E08442;
    --background-color: black;
    --text-color: white;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --text2-color: #ffffff; 
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Chat Container */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

/* Header Styles */
.chat-header {
    text-align: center;
    margin-bottom: 20px;
}

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

.header-text {
    margin: 0 15px;
}

.header-icon {
    width: 80px;
    height: 120px;
    object-fit: contain;
}

.chat-header h1 {
    margin: 0;
    color: var(--primary-color);
}

.chat-header p {
    margin: 5px 0 0;
    color: var(--secondary-color);
}

/* Messages Area */
.chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    max-height: calc(100vh - 200px);
    padding: 20px;
    margin-bottom: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Design option buttons */
.design-option-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.option-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    color: white;
}

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

.create-design-button {
    background-color: var(--secondary-color);
    color: white;
}

/* Design creation modal */
.design-creation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.design-creation-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: auto;
    display: flex;
    flex-direction: row;
}

/* Mobile styles for modal */
@media (max-width: 600px) {
    .design-creation-modal-content {
        flex-direction: column;
    }
}

.design-canvas-container {
    flex: 1;
    min-height: 300px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.design-canvas {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
}

.generated-design-image {
    max-width: 100%;
    max-height: 100%;
}

.design-input-container {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.design-input-label {
    font-weight: bold;
}

.design-input-box {
    width: 100%;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.design-generate-button,
.design-close-button,
.design-use-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.design-generate-button {
    background-color: var(--primary-color);
    color: white;
}

.design-close-button {
    background-color: #ccc;
    color: black;
}

.design-use-button {
    background-color: var(--success-color);
    color: white;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in-out;
}

.message.user {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.message.bot {
    background-color: var(--background-color);
    color: var(--text2-color);
    margin-right: auto;
    -webkit-text-stroke: 0.3px rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.message.system {
    background-color: var(--secondary-color);
    color: white;
    margin: 10px auto;
    text-align: center;
    font-style: italic;
}

.message.typing {
    background-color: var(--background-color);
    color: var(--secondary-color);
    font-style: italic;
}

.message img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
    margin: 10px 0;
}

/* Footer and Input Area */
.chat-footer {
    flex: 0 0 auto;
    margin-top: auto;
    width: 100%;
    padding: 20px 0;
    background: var(--background-color);
    box-sizing: border-box;
}

.chat-input-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    max-width: 800px;
    margin: 0 auto;
}

.input-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    height: 36px;
    max-height: 36px;
    overflow: hidden;
}

.chat-upload-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    flex-shrink: 0;
}

.chat-upload-button:hover {
    background-color: var(--border-color);
}

.chat-upload-button svg {
    color: var(--secondary-color);
}

#chat-input {
    width: 100%;
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    padding: 8px 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    height: 36px;
    max-height: 36px;
    overflow-y: auto;
    box-sizing: border-box;
}

#chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#send-button {
    min-width: 70px;
    padding: 10px 20px;
    height: 36px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#send-button:hover {
    background-color: #0056b3;
}

/* Product Images */
.product-image {
    text-align: center;
    margin: 15px 0;
}

.product-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modal and Upload Progress */
.placement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1000;
}

.placement-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 2% auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.upload-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 250px;
}

.progress-text {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--secondary-color);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--success-color);
    width: 0;
    transition: width 0.3s ease-in-out;
}

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

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Design option buttons container */
.design-option-buttons {
    display: flex;
    justify-content: center; /* Center the buttons horizontally */
    gap: 16px; /* Space between buttons */
    margin-top: 12px;
    margin-bottom: 8px;
    width: 100%;
}

/* Style for both buttons */
.option-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 700; /* Make text bold */
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 120px; /* Set minimum width for both buttons */
    text-align: center;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white; /* Add this to ensure text is white */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Order button specific styling */
.order-button {
    background-color: var(--primary-color);
    color: white;
}
.order-button:hover {
    background-color: var(--primary-color-dark, #0056b3);
    transform: translateY(-1px);
}

/* Create Design button specific styling */
.create-design-button {
    background-color: var(--secondary-color);
    color: white;
}
.create-design-button:hover {
    background-color: var(--secondary-color-dark, #6c757d);
    transform: translateY(-1px);
}

/* Active state for both buttons */
.option-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
    .chat-container {
        padding: 10px;
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .message {
        max-width: 90%;
    }
    
    .product-image img {
        max-height: 200px;
    }

    .upload-progress {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    /* Mobile-specific button styles */
    .option-button {
        font-size: 15px;
        padding: 10px 12px;
        white-space: normal;
        text-align: center;
        min-height: 60px;
        line-height: 1.2;
        min-width: 0;
        flex: 1;
    }
}