/**
 * Agency Postcode Finder - Frontend Styles
 */

.apf-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.apf-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.apf-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.apf-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.apf-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.apf-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.apf-button:hover {
    background-color: #005177;
}

.apf-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.apf-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.apf-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.apf-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: apf-spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes apf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive styles */
@media (max-width: 480px) {
    .apf-form {
        flex-direction: column;
    }
    
    .apf-input, 
    .apf-button {
        width: 100%;
    }
}
