/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

header p {
    opacity: 0.9;
    font-size: 14px;
}

/* ===== FORM STYLES ===== */
.order-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== SPECIFIC INPUT TYPES ===== */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== CHECKBOX GROUP ===== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* ===== BUTTONS ===== */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: inherit;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.new-order-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.new-order-btn:hover {
    background: #5a6fd8;
}

/* ===== SUCCESS MESSAGE ===== */
.success-message {
    padding: 40px 30px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
}

.success-message h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 22px;
}

.success-message p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* ===== ADDRESS AUTOCOMPLETE ===== */
.address-group {
    position: relative;
}

.suggestions-container {
    position: absolute;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    margin-top: 5px;
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-main {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.suggestion-details {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.suggestion-type {
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.suggestion-city {
    color: #888;
}

/* ===== HINTS AND HELPERS ===== */
.hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.error {
    border-color: #e74c3c !important;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.suggestion-item.error {
    background-color: #ffe6e6;
}

.suggestion-item.error .suggestion-main {
    color: #d63031;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 16px;
    }
    
    header {
        padding: 25px 20px;
    }
    
    .order-form {
        padding: 25px 20px;
    }
    
    input, select, textarea {
        padding: 10px 14px;
    }
}