/* Contact Directory Frontend Styles */

.cd-directory-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cd-directory-header {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.cd-directory-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #666;
}

/* Table Styles */
.cd-directory-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cd-directory-table thead {
    background: #f5f5f5;
}

.cd-directory-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.cd-directory-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cd-contact-row:hover {
    background: #f9f9f9;
}

.cd-contact-name {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.cd-contact-name:hover {
    color: #005a87;
    text-decoration: underline;
}

.cd-no-contacts {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Form Row */
.cd-form-row td {
    background: #f0f7ff;
    padding: 0;
}

.cd-contact-form-wrapper {
    padding: 30px;
}

.cd-contact-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

/* Form Styles */
.cd-contact-form {
    max-width: 600px;
}

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

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

.cd-form-group input,
.cd-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.cd-form-group input:focus,
.cd-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.1);
}

.cd-form-group .required {
    color: #d63638;
}

/* Form Actions */
.cd-form-actions {
    margin-top: 20px;
}

.cd-submit-btn,
.cd-cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px;
}

.cd-submit-btn {
    background: #007cba;
    color: white;
}

.cd-submit-btn:hover {
    background: #005a87;
}

.cd-cancel-btn {
    background: #ddd;
    color: #333;
}

.cd-cancel-btn:hover {
    background: #ccc;
}

.cd-loading {
    color: #666;
    margin-left: 10px;
}

/* Messages */
.cd-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .cd-directory-wrapper {
        padding: 10px;
    }
    
    .cd-directory-header {
        font-size: 1.5em;
    }
    
    .cd-directory-table th,
    .cd-directory-table td {
        padding: 10px;
    }
    
    .cd-contact-form-wrapper {
        padding: 20px;
    }
    
    .cd-form-group input,
    .cd-form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 480px) {
    .cd-directory-table {
        font-size: 14px;
    }
    
    .cd-submit-btn,
    .cd-cancel-btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}
