.cdc-form-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.cdc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.cdc-form-group input[type="text"],
.cdc-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.cdc-form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

.cdc-form-group input[type="text"]:focus,
.cdc-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

.cdc-form-group select:hover {
    border-color: #999;
}

.cdc-form-group button {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.cdc-form-group button:hover {
    background: #005a87;
}

.cdc-form-group button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#cdc-form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

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

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

/* Loading spinner */
.cdc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: cdc-spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* International phone input styles - Enhanced */
.cdc-phone-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.cdc-country-select {
    /* Reduced width and set flex-basis */
    flex: 0 0 90px; 
    width: 90px;
    padding: 10px 5px; /* Reduced side padding to fit content */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px; /* Slightly smaller font for the code */
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Adjusted background position for the arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 14px;
    padding-right: 20px;
    box-sizing: border-box;
    font-family: monospace;
}

.cdc-country-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

.cdc-local-number {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: monospace;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.cdc-local-number:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

.cdc-local-number.valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2328a745' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

.cdc-local-number.invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Tooltip for format hint */
.cdc-local-number[title] {
    cursor: help;
}

/* Phone hint text */
.cdc-phone-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: block;
}

.cdc-phone-hint:before {
    content: 'ⓘ';
    margin-right: 4px;
}

/* Hide the original phone inputs */
#phone_number,
#whatsapp_number {
    display: none !important;
}

/* Responsive styles */
@media (max-width: 480px) {
    .cdc-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .cdc-phone-input-group {
        gap: 8px;
    }
    
    .cdc-country-select {
        flex: 0 0 80px;
        width: 80px;
        font-size: 13px;
    }
    
    .cdc-local-number {
        font-size: 15px;
        padding: 8px;
    }
    
    .cdc-phone-hint {
        font-size: 11px;
    }
    
    .cdc-local-number.valid,
    .cdc-local-number.invalid {
        background-size: 18px;
        padding-right: 35px;
    }
}

/* For very small screens */
@media (max-width: 360px) {
    .cdc-country-select {
        width: 90px;
        font-size: 14px;
        padding: 7px;
        padding-right: 22px;
    }
    
    .cdc-local-number {
        font-size: 14px;
        padding: 7px;
    }
    
    .cdc-phone-input-group {
        gap: 5px;
    }
}

/* Style for the hidden full phone input */
.cdc-full-phone {
    display: none;
}

/* Optional: Style for form focus states */
.cdc-form-group input:focus-visible,
.cdc-form-group select:focus-visible,
.cdc-country-select:focus-visible,
.cdc-local-number:focus-visible {
    outline: none;
}

/* Print styles */
@media print {
    .cdc-form-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .cdc-form-group button,
    .cdc-phone-hint:before {
        display: none;
    }
}

/* Add these styles to style.css for the suburb field */
#suburb {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

#suburb:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

#suburb::placeholder {
    color: #999;
    font-style: italic;
}

/* Yellow Pages Directory Styles */
.yellow-pages-container {
    background-color: #fff9c4; /* Classic yellow tint */
    padding: 30px;
    border: 2px solid #333;
    font-family: "Courier New", Courier, monospace; /* Typewriter feel */
    color: #111;
    max-width: 800px;
    margin: 20px auto;
}

.yp-header {
    text-align: center;
    border-bottom: 3px double #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.yp-header h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 2px;
}

.yp-town-heading {
    background: #333;
    color: #fff9c4;
    padding: 5px 10px;
    margin-top: 25px;
    text-transform: uppercase;
    font-size: 18px;
}

.yp-entry {
    margin-bottom: 15px;
    border-bottom: 1px dashed #999;
    padding-bottom: 5px;
}

.yp-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.yp-company-name {
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.yp-dots {
    flex-grow: 1;
    border-bottom: 2px dotted #555;
    margin: 0 10px 5px;
}

.yp-phone {
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.yp-details {
    font-size: 14px;
    margin-top: 2px;
    display: flex;
    gap: 15px;
    color: #444;
}

.yp-suburb {
    font-style: italic;
}

.yp-whatsapp {
    color: #004d40; /* Dark green for contrast */
}

.cdc-no-results {
    text-align: center;
    padding: 20px;
    background: #fdfae3;
    border: 1px solid #ddd;
}