/* ============================================ */
/* WP Easy CRM - Unified Button & Form Styles   */
/* Inherits WordPress Admin Theme Colors        */
/* ============================================ */

:root {
    --eacr-border: #e2e8f0;
    --eacr-radius: 10px;
    --eacr-height: 34px;
}

/* ============================================ */
/* BASE BUTTON STYLES - Inherit WP Core Colors  */
/* ============================================ */

.eacr-button,
.button-primary,
.button-secondary,
button.button,
a.button,
input[type="submit"],
input[type="button"],
.wp-core-ui .button-primary,
.wp-core-ui .button-secondary,
.wp-core-ui button.button,
.wp-core-ui a.button,
.wp-core-ui input[type="submit"],
.wp-core-ui input[type="button"] {
    border-radius: var(--eacr-radius) !important;
    transition: all 0.2s ease !important;
    height: var(--eacr-height) !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1rem !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

/* Primary Buttons - Use WordPress theme primary color */
.button-primary,
.wp-core-ui .button-primary,
input[type="submit"].button-primary {
    /* No custom background - let WordPress theme handle it */
    border-radius: var(--eacr-radius) !important;
}

/* Secondary Buttons - Use WordPress theme secondary color */
.button-secondary,
.wp-core-ui .button-secondary,
a.button,
button.button {
    /* No custom background - let WordPress theme handle it */
    border-radius: var(--eacr-radius) !important;
}

/* Danger/Delete Buttons - Use WordPress error color */
.eacr-button-danger,
.delete-client-link,
.eacr-delete-btn {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.eacr-button-danger:hover,
.delete-client-link:hover,
.eacr-delete-btn:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

/* ============================================ */
/* FORM ELEMENTS - Selects, Inputs, Textareas */
/* ============================================ */

.eacr-select,
select.eacr-select,
.wp-core-ui select,
.eacr-input,
input.eacr-input[type="text"],
input.eacr-input[type="email"],
input.eacr-input[type="number"],
input.eacr-input[type="tel"],
.eacr-textarea,
textarea.eacr-textarea {
    border-radius: var(--eacr-radius) !important;
    border: 1px solid var(--eacr-border) !important;
    padding: 0 0.75rem !important;
    font-size: 0.75rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
}

.eacr-select,
select.eacr-select,
.wp-core-ui select {
    height: var(--eacr-height) !important;
    line-height: var(--eacr-height) !important;
    cursor: pointer !important;
}

.eacr-input,
input.eacr-input[type="text"],
input.eacr-input[type="email"],
input.eacr-input[type="number"],
input.eacr-input[type="tel"] {
    height: var(--eacr-height) !important;
    line-height: var(--eacr-height) !important;
}

.eacr-textarea,
textarea.eacr-textarea {
    padding: 0.5rem 0.75rem !important;
    line-height: 1.5 !important;
    min-height: 100px !important;
}

.eacr-select:focus,
select.eacr-select:focus,
.wp-core-ui select:focus,
.eacr-input:focus,
.eacr-textarea:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 1px #3b82f6 !important;
}

/* ============================================ */
/* DROPDOWN WITH CUSTOM ARROW */
/* ============================================ */

.eacr-select-with-arrow,
select.eacr-select-with-arrow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' 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 0.7rem center;
    background-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2rem !important;
}

/* ============================================ */
/* TAG BUBBLES & PILLS */
/* ============================================ */

.eacr-tag-bubble,
.tag-bubble {
    display: inline-block;
    border-radius: 15px;
    padding: 4px 10px;
    margin: 4px;
    font-size: 0.7rem !important;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
}

.eacr-tag-bubble:hover,
.tag-bubble:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.eacr-tag-delete,
.tag-delete {
    margin-left: 6px;
    color: rgba(0,0,0,0.5);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 11px;
    font-weight: bold;
}

.eacr-tag-delete:hover,
.tag-delete:hover {
    color: rgba(0,0,0,0.8);
}

/* ============================================ */
/* ADD TAG BUTTON (+) */
/* ============================================ */

.eacr-add-tag-btn,
#addTagButton {
    background-color: #f0f0f0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    text-align: center !important;
    line-height: 34px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

.eacr-add-tag-btn:hover,
#addTagButton:hover {
    background-color: #e0e0e0 !important;
    transform: scale(1.05);
}

/* ============================================ */
/* SHOW MORE BUTTON */
/* ============================================ */

.eacr-show-more-btn,


.eacr-show-more-btn:hover,
.show-more-btn:hover {
    background-color: #45684a !important;
}

/* ============================================ */
/* WHATSAPP BUTTON & ICONS */
/* ============================================ */

.eacr-whatsapp-icon,
.whatsapp-icon {
    color: #25D366 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.eacr-whatsapp-icon:hover,
.whatsapp-icon:hover {
    color: #128C7E !important;
    transform: scale(1.1);
}

/* ============================================ */
/* TABLES - Consistent styling */
/* ============================================ */

.eacr-table,
.wp-list-table {
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid var(--eacr-border) !important;
    background: white !important;
}

.eacr-table th,
.wp-list-table th {
    background: #f8fafc !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    border-bottom: 1px solid var(--eacr-border) !important;
    padding: 0.75rem !important;
}

.eacr-table td,
.wp-list-table td {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 0.5rem 0.75rem !important;
}

.eacr-table tr:hover,
.wp-list-table tr:hover {
    background: #fafcff !important;
}

/* ============================================ */
/* PAGINATION */
/* ============================================ */

.eacr-pagination .page-numbers,
.dataTables_paginate .paginate_button {
    padding: 0.45rem 1rem !important;
    margin: 0 0.2rem !important;
    border-radius: var(--eacr-radius) !important;
    background: white !important;
    border: 1px solid var(--eacr-border) !important;
    color: #475569 !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.eacr-pagination .current,
.dataTables_paginate .paginate_button.current {
    background: var(--eacr-primary) !important;
    border-color: var(--eacr-primary) !important;
    color: white !important;
}

/* ============================================ */
/* CLIENT INFO BOX */
/* ============================================ */

.client-info-box {
    background: #ffffff;
    border: 1px solid var(--eacr-border);
    border-radius: 12px;
    padding: 25px 30px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */

@media (max-width: 768px) {
    :root {
        --eacr-height: 32px;
    }
    
    .eacr-button,
    .button-primary,
    .button-secondary,
    button.button,
    a.button,
    input[type="submit"] {
        font-size: 0.7rem !important;
        padding: 0 0.75rem !important;
    }
}