/* Estimation Milkiya - Modern Design Inspired by Images */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    margin: 0;
    padding: 20px;
}

/* Main container */
#milkiya-estimation-form {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Header with progress bar */
.milkiya-header {
    background: linear-gradient(135deg, #dd3334 0%, #a31515 100%);
    padding: 40px 32px 32px;
    text-align: center;
    color: white;
}

.milkiya-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px 0;
    line-height: 1.2;
    color: #fff;
}

/* Progress bar */
.milkiya-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.milkiya-progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.milkiya-progress-step.active {
    background: #fff;
    color: #dd3334;
    border-color: #fff;
}

.milkiya-progress-step.completed {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Step containers */
.milkiya-step {
    display: none;
    padding: 40px 32px;
    min-height: 400px;
}

.milkiya-step.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* Chat-like interface */
.milkiya-chat {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
}

.milkiya-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dd3334 0%, #a31515 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.milkiya-chat-bubble {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

.milkiya-chat-bubble h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.milkiya-chat-bubble p {
    margin: 0;
    color: #4b5563; /* Darker text for readability */
    font-size: 15px; /* Slightly larger font */
    line-height: 1.6; /* Improved line height */
}

/* Form fields */
.milkiya-form-group {
    margin-bottom: 24px;
}

.milkiya-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .milkiya-form-columns {
        grid-template-columns: 1fr;
    }
}

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

.milkiya-form-group input,
.milkiya-form-group select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
    background: #fff !important;
}

.milkiya-form-group input:focus,
.milkiya-form-group select:focus {
    outline: none;
    border-color: #dd3334;
    box-shadow: 0 0 0 3px rgba(221, 51, 52, 0.1);
    transform: translateY(-1px);
}

/* Address input with icon */
.milkiya-address-input {
    position: relative;
}

.milkiya-address-input input {
    padding-right: 50px;
}

.milkiya-address-input .address-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a31515; /* Changed color */
    font-size: 18px;
}

/* Property type selection */
.milkiya-property-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.milkiya-property-type {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.milkiya-property-type:hover {
    border-color: #dd3334;
    transform: translateY(-2px);
}

.milkiya-property-type.selected {
    border-color: #dd3334;
    background: #fef2f2;
}

.milkiya-property-type .type-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6b7280;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #fff;
}

.milkiya-property-type.selected .type-icon {
    background: #dd3334;
    color: white;
}

.milkiya-property-type .type-label {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
}

/* Buttons */
.milkiya-button {
    background: linear-gradient(135deg, #dd3334 0%, #a31515 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.milkiya-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.milkiya-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.milkiya-button.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.milkiya-button.secondary:hover {
    background: #e5e7eb;
}

/* Button container */
.milkiya-button-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

/* Additional criteria section */
.milkiya-additional-criteria {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #d1d5db;
}

.milkiya-additional-criteria h4 {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
}

.milkiya-criteria-toggle {
    background: none;
    border: none;
    color: #dd3334;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.milkiya-criteria-toggle:hover {
    color: #a31515;
}

/* Radio button groups */
.milkiya-radio-group {
    display: flex;
    gap: 24px;
    margin-top: 12px;
}

.milkiya-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.milkiya-radio-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .milkiya-header {
        padding: 32px 24px 24px;
    }
    
    .milkiya-header h1 {
        font-size: 24px;
    }
    
    .milkiya-step {
        padding: 32px 24px;
    }
    
    .milkiya-property-types {
        grid-template-columns: 1fr;
    }
    
    .milkiya-button-container {
        flex-direction: column;
    }
    
    .milkiya-button {
        width: 100%;
    }
}

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

/* Success message */
#milkiya-estimation-result {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    text-align: center;
    color: #065f46;
    font-weight: 600;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Error message */
#milkiya-estimation-result.error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.success-message {
    color: #dd3334;
    font-size: 16px;
    margin-top: 10px;
}

.milkiya-error-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    display: block;
}