/* CalWhat Calculator Platform - AddressTranslator Specific Styles */
/* 地址英譯 中翻英 - Address Translator Styles */

/* Input Section */
.address-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.address-input {
    width: 100%;
    padding: 1.25rem 1rem;
    border: 2px solid #48bb78;
    border-radius: 16px;
    font-size: 1.1rem;
    font-family: 'Noto Sans TC', sans-serif;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.1);
    resize: vertical;
    min-height: 80px;
}

.address-input:focus {
    outline: none;
    border-color: #38a169;
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.25);
    transform: translateY(-2px);
}

.address-input::placeholder {
    color: #a0aec0;
    font-size: 0.95rem;
}

/* Auto-suggest Dropdown */
.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestions-container.active {
    display: block;
}

.suggestion-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    padding-left: 1.25rem;
}

.suggestion-item i {
    color: #667eea;
    font-size: 0.875rem;
}

.suggestion-text {
    color: #2d3748;
    font-size: 0.95rem;
}

.suggestion-match {
    color: #667eea;
    font-weight: 600;
}

.no-suggestions {
    padding: 1rem;
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
}

/* Parse Button */
.btn-parse {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-parse:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(72, 187, 120, 0.3);
}

.btn-parse:active {
    transform: translateY(0);
}

.btn-parse:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

/* Results Section */
.result-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.result-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

/* Postal Code Display */
.postal-code-display {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.postal-code-label {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.postal-code-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 0.125rem;
}

/* English Address Display */
.english-address-display {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 4px solid #48bb78;
}

.address-line {
    font-size: 1.05rem;
    color: #2d3748;
    line-height: 1.75;
    font-family: 'Roboto', sans-serif;
    word-break: break-word;
}

/* Copy Button */
.btn-copy {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-copy:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-copy.copied {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

/* QR Code Section */
.qr-code-container {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#qrcode {
    display: inline-block;
}

#qrcode canvas,
#qrcode img {
    border-radius: 8px;
}

.qr-code-hint {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #718096;
}

/* Google Maps Button */
.btn-maps {
    width: 100%;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-maps:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-maps:active {
    transform: translateY(0);
}

/* Error Message */
.error-message {
    background: #fff5f5;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.error-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ef4444;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-text {
    color: #991b1b;
    font-size: 0.95rem;
}

/* Suggestions for Error */
.error-suggestions {
    margin-top: 1rem;
}

.error-suggestions-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-list li {
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.suggestion-list li:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateX(4px);
}

/* Action Buttons Grid */
.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Action Buttons */
.btn-custom,
.btn-custom-outline {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-custom-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-custom-outline:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-custom:active,
.btn-custom-outline:active {
    transform: translateY(0);
}

/* Sponsor Button */
.btn-sponsor {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
}

.btn-sponsor:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-sponsor:active {
    transform: translateY(0);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Helper Text */
.helper-text {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.helper-text i {
    color: #667eea;
}

/* Example Addresses */
.example-addresses {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.example-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.example-item {
    padding: 0.625rem 0.875rem;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.example-item:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    border-color: #667eea;
    transform: translateX(4px);
}

/* Responsive: Mobile single column */
@media (max-width: 576px) {
    .action-buttons-grid {
        grid-template-columns: 1fr;
    }

    .postal-code-value {
        font-size: 2rem;
    }

    .address-input {
        font-size: 1rem;
        padding: 1rem 0.875rem;
    }

    .address-line {
        font-size: 0.95rem;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .suggestions-container {
        max-height: 240px;
    }
}

/* Print styles */
@media print {
    .action-buttons-grid,
    .btn-parse,
    .btn-copy,
    .btn-maps,
    .example-addresses {
        display: none;
    }

    .result-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}
