/**
 * Plugin Isolation CSS - Complete Protection
 * Namespace: #mpd-tax-plugin, .mpd-tax-wrap
 * High specificity to override ANY theme
 */

/* ===========================================
   GLOBAL PLUGIN WRAPPER
   =========================================== */
#mpd-tax-plugin,
.mpd-tax-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #2d3748;
}

#mpd-tax-plugin *,
.mpd-tax-wrap * {
    box-sizing: border-box;
}

/* ===========================================
   HEADINGS - ALL LEVELS
   =========================================== */
#mpd-tax-plugin h1,
#mpd-tax-plugin h2,
#mpd-tax-plugin h3,
#mpd-tax-plugin h4,
#mpd-tax-plugin h5,
#mpd-tax-plugin h6,
.mpd-tax-wrap h1,
.mpd-tax-wrap h2,
.mpd-tax-wrap h3,
.mpd-tax-wrap h4,
.mpd-tax-wrap h5,
.mpd-tax-wrap h6,
.mpd-tax-heading-1,
.mpd-tax-heading-2,
.mpd-tax-heading-3,
.mpd-tax-heading-4 {
    font-family: inherit;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0;
    padding: 0;
    border: none;
    background: none;
    text-transform: none;
    letter-spacing: normal;
}

#mpd-tax-plugin h1,
.mpd-tax-wrap h1,
.mpd-tax-heading-1 {
    font-size: 32px;
    margin-bottom: 0;
    color: #fff;
}

#mpd-tax-plugin h2,
.mpd-tax-wrap h2,
.mpd-tax-heading-2 {
    font-size: 28px;
    margin-bottom: 20px;
}

#mpd-tax-plugin h3,
.mpd-tax-wrap h3,
.mpd-tax-heading-3 {
    font-size: 24px;
    margin-bottom: 0;
    color: #fff;
}

#mpd-tax-plugin h4,
.mpd-tax-wrap h4,
.mpd-tax-heading-4 {
    font-size: 20px;
    margin-bottom: 12px;
}

/* ===========================================
   BUTTONS - ALL TYPES
   =========================================== */
#mpd-tax-plugin button,
#mpd-tax-plugin .mpd-tax-button,
#mpd-tax-plugin .button,
#mpd-tax-plugin input[type="submit"],
#mpd-tax-plugin input[type="button"],
.mpd-tax-wrap button,
.mpd-tax-wrap .mpd-tax-button,
.mpd-tax-wrap .button,
.mpd-tax-btn,
.mpd-tax-btn-primary,
.mpd-tax-btn-secondary {
    display: inline-block;
    padding: 0 15px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    height: 36px;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: none;
    letter-spacing: normal;
    outline: none;
}

#mpd-tax-plugin button:hover,
#mpd-tax-plugin .mpd-tax-button:hover,
.mpd-tax-wrap button:hover,
.mpd-tax-wrap .mpd-tax-button:hover,
.mpd-tax-btn:hover,
.mpd-tax-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

#mpd-tax-plugin button:active,
.mpd-tax-wrap button:active,
.mpd-tax-btn:active {
    transform: translateY(0);
}

#mpd-tax-plugin button:disabled,
.mpd-tax-wrap button:disabled,
.mpd-tax-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button */
.mpd-tax-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.mpd-tax-btn-secondary:hover {
    background: #f7fafc;
    border-color: #5568d3;
    color: #5568d3;
}

/* ===========================================
   ENHANCED BUTTONS (View, CSV, Excel)
   =========================================== */
#mpd-tax-plugin .mpd-btn,
.mpd-tax-wrap .mpd-btn,
.mpd-action-buttons .mpd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
}

#mpd-tax-plugin .mpd-btn-view,
.mpd-tax-wrap .mpd-btn-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#mpd-tax-plugin .mpd-btn-csv,
.mpd-tax-wrap .mpd-btn-csv {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

#mpd-tax-plugin .mpd-btn-excel,
.mpd-tax-wrap .mpd-btn-excel {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

#mpd-tax-plugin .mpd-btn:hover,
.mpd-tax-wrap .mpd-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ===========================================
   FORM ELEMENTS
   =========================================== */
#mpd-tax-plugin input[type="text"],
#mpd-tax-plugin input[type="email"],
#mpd-tax-plugin input[type="password"],
#mpd-tax-plugin input[type="number"],
#mpd-tax-plugin input[type="date"],
#mpd-tax-plugin select,
#mpd-tax-plugin textarea,
.mpd-tax-wrap input[type="text"],
.mpd-tax-wrap input[type="email"],
.mpd-tax-wrap input[type="password"],
.mpd-tax-wrap input[type="number"],
.mpd-tax-wrap input[type="date"],
.mpd-tax-wrap select,
.mpd-tax-wrap textarea,
.mpd-tax-input,
.mpd-tax-select {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: #2d3748;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

#mpd-tax-plugin input:focus,
#mpd-tax-plugin select:focus,
#mpd-tax-plugin textarea:focus,
.mpd-tax-wrap input:focus,
.mpd-tax-wrap select:focus,
.mpd-tax-wrap textarea:focus,
.mpd-tax-input:focus,
.mpd-tax-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Labels */
#mpd-tax-plugin label,
.mpd-tax-wrap label,
.mpd-tax-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
}

/* ===========================================
   TABLES
   =========================================== */
#mpd-tax-plugin table,
.mpd-tax-wrap table,
.mpd-tax-table,
.mpd-tax-cases-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#mpd-tax-plugin table th,
.mpd-tax-wrap table th,
.mpd-tax-table th,
.mpd-tax-cases-table th {
    padding: 12px;
    font-weight: 700;
    font-size: 13px;
    color: #4a5568;
    text-align: left;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#mpd-tax-plugin table td,
.mpd-tax-wrap table td,
.mpd-tax-table td,
.mpd-tax-cases-table td {
    padding: 5px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
    color: #2d3748;
}

#mpd-tax-plugin table tbody tr:hover,
.mpd-tax-wrap table tbody tr:hover,
.mpd-tax-table tbody tr:hover,
.mpd-tax-cases-table tbody tr:hover {
    background: #f8f9fa;
}

/* ===========================================
   CARDS
   =========================================== */
#mpd-tax-plugin .card,
#mpd-tax-plugin .mpd-tax-card,
.mpd-tax-wrap .card,
.mpd-tax-wrap .mpd-tax-card,
.mpd-tax-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

#mpd-tax-plugin .card h3,
#mpd-tax-plugin .mpd-tax-card h3,
.mpd-tax-wrap .card h3,
.mpd-tax-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
}

/* ===========================================
   BADGES
   =========================================== */
#mpd-tax-plugin .badge,
#mpd-tax-plugin .mpd-badge,
.mpd-tax-wrap .badge,
.mpd-tax-wrap .mpd-badge,
.mpd-tax-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 6px;
    text-transform: none;
    letter-spacing: normal;
}

.mpd-badge-primary,
.mpd-tax-badge-primary {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.mpd-badge-success,
.mpd-tax-badge-success {
    background: rgba(72, 187, 120, 0.15);
    color: #38a169;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.mpd-badge-secondary,
.mpd-tax-badge-secondary {
    background: rgba(113, 128, 150, 0.15);
    border: 1px solid rgba(113, 128, 150, 0.3);
}

/* ===========================================
   PARAGRAPHS & TEXT
   =========================================== */
#mpd-tax-plugin p,
.mpd-tax-wrap p {
    margin: 0;
    line-height: 1.6;
}

#mpd-tax-plugin strong,
.mpd-tax-wrap strong {
    font-weight: 700;
}

#mpd-tax-plugin a,
.mpd-tax-wrap a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

#mpd-tax-plugin a:hover,
.mpd-tax-wrap a:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* ===========================================
   ALERTS & MESSAGES
   =========================================== */
#mpd-tax-plugin .alert,
#mpd-tax-plugin .notice,
#mpd-tax-plugin .message,
.mpd-tax-wrap .alert,
.mpd-tax-wrap .notice,
.mpd-tax-wrap .message,
.mpd-tax-alert,
.mpd-tax-notice,
.mpd-tax-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid transparent;
}

.mpd-tax-message-success,
.mpd-tax-alert-success {
    background: #c6f6d5;
    color: #22543d;
    border-left-color: #38a169;
}

.mpd-tax-message-error,
.mpd-tax-alert-error {
    background: #fed7d7;
    color: #742a2a;
    border-left-color: #e53e3e;
}

.mpd-tax-message-info,
.mpd-tax-alert-info {
    background: #bee3f8;
    color: #2c5282;
    border-left-color: #3182ce;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 782px) {
    #mpd-tax-plugin h1,
    .mpd-tax-wrap h1,
    .mpd-tax-heading-1 {
        font-size: 28px;
    }
    
    #mpd-tax-plugin h2,
    .mpd-tax-wrap h2,
    .mpd-tax-heading-2 {
        font-size: 24px;
    }
    
    #mpd-tax-plugin button,
    .mpd-tax-wrap button,
    .mpd-tax-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.mpd-tax-text-center { text-align: center; }
.mpd-tax-text-right { text-align: right; }
.mpd-tax-text-left { text-align: left; }

.mpd-tax-mb-0 { margin-bottom: 0; }
.mpd-tax-mb-1 { margin-bottom: 8px; }
.mpd-tax-mb-2 { margin-bottom: 16px; }
.mpd-tax-mb-3 { margin-bottom: 24px; }

.mpd-tax-mt-0 { margin-top: 0; }
.mpd-tax-mt-1 { margin-top: 8px; }
.mpd-tax-mt-2 { margin-top: 16px; }
.mpd-tax-mt-3 { margin-top: 24px; }
