.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 Style */
.cdc-yellow-pages {
    background: #fff9c4;
    padding: 0 20px;
    font-family: default;
}

.cdc-yp-entry {
    padding: 12px 0;
    border-bottom: 1px dotted #555;
}

.cdc-yp-entry:last-child {
    border-bottom: none;
}

.cdc-yp-name {
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    color: #000;
}

.cdc-yp-meta {
    font-size: 14px;
    color: #333;
}

.cdc-yp-contacts {
    font-size: 14px;
    margin-top: 6px;
}

.cdc-yp-contacts div {
    line-height: 1.4;
}

.cdc-directory-empty {
    background: #fff3cd;
    padding: 10px;
    border: 1px solid #ffeeba;
}

/* Directory Filter Styles */
.cdc-directory-filters {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
}

#cdc-search-input {
    flex: 2;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff9c4;
}

#cdc-town-filter {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff9c4;
}

@media (max-width: 600px) {
    .cdc-directory-filters {
        flex-direction: column;
    }
}

.cdc-my-listings-container {
        max-width: 1200px;
        margin: 20px auto;
        padding: 20px;
        background: #f9f9f9;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
.cdc-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
}

.cdc-listings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
}

.cdc-listings-table th,
.cdc-listings-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cdc-listings-table th {
    background: #007cba;
    color: white;
    font-weight: 600;
}

.cdc-listings-table tr:hover {
    background: #f5f5f5;
}

.cdc-bulk-actions {
    margin: 15px 0;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
}

.cdc-bulk-actions select {
    padding: 8px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cdc-button {
    display: inline-block;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    margin-top: 5px;
}

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

.cdc-button-primary {
    background: #28a745;
}

.cdc-button-primary:hover {
    background: #218838;
}

.cdc-button-danger {
    background: #dc3545;
}

.cdc-button-danger:hover {
    background: #c82333;
}

.cdc-button-small {
    padding: 4px 8px;
    font-size: 12px;
    margin: 2px;
}

.cdc-actions {
    white-space: nowrap;
}

.cdc-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

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

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

@media (max-width: 768px) {
    .cdc-listings-table {
        display: block;
        overflow-x: auto;
    }
    
    .cdc-listings-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .cdc-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .cdc-button-small {
        width: 100%;
        text-align: center;
    }
}   