/**
 * GDDC Customer Management CSS
 */

/* Container styles */
.gddc-customer-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.gddc-customer-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.gddc-customer-header h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.gddc-customer-search-container {
    max-width: 500px;
}

/* Table styles */
.gddc-customers-table {
    width: 100%;
    margin-bottom: 20px;
}

.gddc-customer-item:hover {
    background-color: #f8f9fa;
}

/* Image styles */
.img-thumbnail {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
}

/* Button spacing */
.btn-group .btn {
    margin-right: 5px;
}

/* Modal styles */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gddc-customer-header {
        flex-direction: column;
    }
    
    .gddc-customer-search-container {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

.gddc-customer-management {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.gddc-customer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gddc-customer-search {
    flex: 1;
    margin-right: 20px;
}

.gddc-customer-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gddc-customer-actions {
    display: flex;
    justify-content: flex-end;
}

.gddc-customers-table th,
.gddc-customers-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.gddc-customers-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.gddc-customers-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.gddc-customers-table tr:hover {
    background-color: #f1f1f1;
}

.gddc-view-customer-btn,
.gddc-edit-customer-btn,
.gddc-delete-customer-btn {
    padding: 5px 10px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.gddc-view-customer-btn {
    background-color: #2196F3;
    color: white;
}

.gddc-edit-customer-btn {
    background-color: #4CAF50;
    color: white;
}

.gddc-delete-customer-btn {
    background-color: #F44336;
    color: white;
}

/* Modal Styles */
.gddc-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.gddc-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 60%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.gddc-close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.gddc-close-modal:hover,
.gddc-close-modal:focus {
    color: black;
    text-decoration: none;
}

/* Customer Details Styles */
.gddc-customer-details {
    margin-top: 20px;
}

.gddc-customer-info {
    margin-bottom: 20px;
}

.gddc-pets-list {
    margin-bottom: 20px;
}

.gddc-pet-item {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gddc-pet-item h5 {
    margin-top: 0;
    margin-bottom: 5px;
}

.gddc-customer-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.gddc-add-pet-btn,
.gddc-edit-customer-btn,
.gddc-close-details-btn {
    padding: 8px 16px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.gddc-add-pet-btn {
    background-color: #2196F3;
    color: white;
}

.gddc-edit-customer-btn {
    background-color: #4CAF50;
    color: white;
}

.gddc-close-details-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

/* Form Styles */
.gddc-form-group {
    margin-bottom: 15px;
}

.gddc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.gddc-form-group input,
.gddc-form-group select,
.gddc-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gddc-form-group textarea {
    height: 100px;
}

.gddc-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.gddc-cancel-form-btn,
.gddc-submit-customer-btn,
.gddc-update-customer-btn,
.gddc-submit-pet-btn {
    padding: 8px 16px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.gddc-cancel-form-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

.gddc-submit-customer-btn,
.gddc-update-customer-btn,
.gddc-submit-pet-btn {
    background-color: #4CAF50;
    color: white;
}

/* Loading and Message Styles */
.gddc-loading {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.gddc-success-message {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    color: #2e7d32;
}

.gddc-error-message {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    color: #c62828;
}

.gddc-close-success-btn {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

.gddc-no-customers {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-top: 20px;
}

.gddc-customer-error {
    color: #c62828;
    padding: 10px;
    background-color: #ffebee;
    border-radius: 4px;
    margin-top: 10px;
}

/* Pet Management Styles */
.gddc-pet-management {
    margin: 20px 0;
}

.gddc-pet-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.gddc-pet-search {
    flex: 1;
    max-width: 300px;
}

.gddc-pet-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gddc-pet-list {
    margin-top: 20px;
}

/* Bootstrap-compatible table styles */
.gddc-pets-table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.gddc-pet-photo {
    width: 80px;
}

.gddc-pet-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gddc-pet-no-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #999;
    font-size: 10px;
    text-align: center;
    border-radius: 4px;
}

.gddc-pet-actions {
    white-space: nowrap;
}

.gddc-loading,
.gddc-error,
.gddc-no-results {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin: 20px 0;
}

.gddc-error {
    background-color: #fff2f2;
    color: #d8000c;
}

/* Bootstrap-compatible button styles if not using Bootstrap */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-warning:hover {
    color: #212529;
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.btn-group > .btn {
    position: relative;
    flex: 0 1 auto;
}

.btn-group > .btn:not(:first-child) {
    margin-left: -1px;
}

.btn-group > .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Bootstrap-compatible grid styles if not using Bootstrap */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    position: relative;
    width: 100%;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Pet information styles */
.pet-count {
    cursor: pointer;
}

.badge.bg-info {
    background-color: #17a2b8;
    color: white;
    font-weight: normal;
    padding: 5px 8px;
    border-radius: 4px;
}

/* Tooltip customization */
.tooltip-inner {
    max-width: 300px;
    padding: 8px 12px;
    text-align: left;
    background-color: #333;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
} 