.container {
    padding: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fafafa;
    min-height: 100vh;
}

h1 {
    color: #323130;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #0078d4;
    padding-bottom: 10px;
}

/* Status and Loading Section */
.status-section {
    margin: 16px 0;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #e1f5fe;
    border: 1px solid #0078d4;
    border-radius: 6px;
    color: #0078d4;
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-display {
    padding: 12px;
    background-color: #fef7f7;
    border: 1px solid #d13438;
    border-radius: 6px;
    color: #d13438;
    font-weight: 500;
}

/* Button Groups */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.action-button {
    padding: 12px 16px;
    border: 1px solid #0078d4;
    border-radius: 6px;
    background-color: #ffffff;
    color: #0078d4;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-button:hover {
    background-color: #f3f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-button.primary {
    background-color: #0078d4;
    color: white;
}

.action-button.primary:hover {
    background-color: #106ebe;
}

.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Icons */
.action-button i {
    width: 16px;
    height: 16px;
}

.icon-reply::before { content: "↩️"; }
.icon-summary::before { content: "📄"; }
.icon-professional::before { content: "💼"; }
.icon-friendly::before { content: "😊"; }

/* Prompt Section */
.prompt-section, .compose-section {
    margin-top: 24px;
    padding: 16px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.compose-section {
    background-color: #f0fff4;
    border: 1px solid #28a745;
}

.prompt-section h3, .compose-section h3 {
    color: #323130;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.compose-section h3 {
    color: #155724;
}

.prompt-help, .compose-help {
    color: #605e5c;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.compose-help {
    color: #155724;
}

.examples {
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.examples strong {
    display: block;
    margin-bottom: 8px;
    color: #323130;
    font-size: 13px;
}

.example-tag {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px 6px 4px 0;
    background-color: #e1f5fe;
    color: #0078d4;
    border: 1px solid #0078d4;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.example-tag:hover {
    background-color: #0078d4;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 120, 212, 0.3);
}

.example-tag:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 120, 212, 0.3);
}

#custom_prompt, #new_email_prompt {
    width: 100%;
    min-height: 80px;
    margin: 8px 0 16px 0;
    padding: 12px;
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#new_email_prompt {
    min-height: 100px;
    border-color: #28a745;
}

#custom_prompt:focus, #new_email_prompt:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

#new_email_prompt:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

#custom_prompt::placeholder {
    color: #666;
    font-style: italic;
}

/* Help Section */
.help-section {
    margin-top: 24px;
    padding: 16px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.help-section details {
    cursor: pointer;
}

.help-section summary {
    font-weight: 600;
    color: #323130;
    padding: 8px 0;
    list-style: none;
    position: relative;
}

.help-section summary::-webkit-details-marker {
    display: none;
}

.help-section summary::before {
    content: "▶";
    position: absolute;
    left: -20px;
    transition: transform 0.2s ease;
}

.help-section details[open] summary::before {
    transform: rotate(90deg);
}

.help-content {
    padding: 12px 0;
    color: #605e5c;
    line-height: 1.5;
}

.help-content p {
    margin: 8px 0;
}

.help-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.help-content code {
    background-color: #f3f3f3;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d13438;
    display: block;
    margin: 8px 0;
    word-break: break-all;
}

/* Add-in Status */
.addon-status {
    background: #e8f4fd;
    border: 1px solid #0078d4;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-icon {
    font-size: 18px;
    min-width: 25px;
}

/* Streaming Settings */
.streaming-settings {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.setting-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row label {
    font-weight: 500;
    margin-right: 10px;
    min-width: 80px;
}

.setting-row input[type="checkbox"] {
    margin-right: 8px;
}

.setting-row select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
}

/* Response Container */
.response-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.response-container h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.response-content {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.response-content.streaming {
    border-left: 3px solid #0078d4;
    animation: streaming-pulse 2s infinite;
}

@keyframes streaming-pulse {
    0%, 100% { border-left-color: #0078d4; }
    50% { border-left-color: #106ebe; }
}

.response-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.action-button.small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Custom Actions */
.custom-actions, .compose-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.custom-actions .action-button, .compose-actions .action-button {
    flex: 1;
}

.compose-actions .action-button {
    background-color: #28a745;
    border-color: #28a745;
}

.compose-actions .action-button:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Setup Verification Styles */
.setup-verification {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.setup-verification h1 {
    color: #0078d4;
    margin-bottom: 30px;
    font-size: 24px;
}

.setup-progress {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.setup-step {
    display: flex;
    align-items: center;
    padding: 12px 0;
    margin: 8px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.setup-step:last-child {
    border-bottom: none;
}

.setup-step.success {
    background: #d4edda;
    border-radius: 5px;
    padding: 12px;
    border: 1px solid #c3e6cb;
}

.setup-step.error {
    background: #f8d7da;
    border-radius: 5px;
    padding: 12px;
    border: 1px solid #f5c6cb;
}

.step-icon {
    font-size: 18px;
    margin-right: 12px;
    min-width: 24px;
    animation: spin 1s linear infinite;
}

.setup-step.success .step-icon,
.setup-step.error .step-icon {
    animation: none;
}

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

.step-text {
    flex: 1;
    text-align: left;
    font-weight: 500;
    color: #333;
}

.setup-actions {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.setup-error {
    margin: 20px 0;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    text-align: left;
}

.error-content h3 {
    color: #856404;
    margin: 0 0 10px 0;
}

.error-content p {
    margin: 10px 0;
    color: #333;
}

.error-help {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #0078d4;
}

.error-help p {
    margin: 5px 0;
    font-weight: bold;
}

.error-help ol {
    margin: 10px 0;
    padding-left: 20px;
}

.error-help li {
    margin: 5px 0;
}

.error-help code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Animation for setup completion */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setup-verification {
    animation: slideIn 0.5s ease-out;
}

/* Success state animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.setup-step.success .step-icon {
    animation: checkmark 0.5s ease-out;
} 