/* assets/css/frontend.css */
#dpc-calculator {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.dpc-form {
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dpc-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.dpc-input-group {
    margin-bottom: 20px;
}

.dpc-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

#dpc-address {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#dpc-address:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.dpc-map-container {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#dpc-map {
    width: 100%;
    min-height: 400px;
}

.dpc-button {
    background-color: #0073aa;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-top: 10px;
    position: relative;
}

.dpc-button:hover {
    background-color: #005a87;
}

.dpc-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.dpc-button.loading:after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

#dpc-results {
    margin-top: 30px;
    padding: 25px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
}

#dpc-results.show {
    opacity: 1;
    transform: translateY(0);
}

#dpc-results h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

#dpc-results p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.6;
}

#dpc-results strong {
    color: #555;
    margin-right: 8px;
}

#dpc-price {
    color: #0073aa;
    font-size: 24px;
    font-weight: 600;
}

.dpc-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.dpc-error.show {
    opacity: 1;
}

/* Map loading state */
.dpc-map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f9f9f9;
}

.dpc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dpc-map-loading p {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.dpc-help-text {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    #dpc-calculator {
        margin: 10px;
    }

    .dpc-form {
        padding: 20px;
    }

    .dpc-form h3 {
        font-size: 20px;
    }

    #dpc-map {
        min-height: 300px;
    }

    .dpc-button {
        width: 100%;
        text-align: center;
    }
}

/* Google Places Autocomplete dropdown styling */
.pac-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-top: 2px;
}

.pac-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
}

.pac-item:hover {
    background-color: #f5f5f5;
}

.pac-item-selected {
    background-color: #e9e9e9;
}