/**
 * Isolated CSS - High Specificity to Override Theme
 * Namespace: .mpd-tax-isolated
 */

/* ===========================================
   RESET & ISOLATION
   =========================================== */
.mpd-tax-isolated {
    all: initial;
    display: block;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

.mpd-tax-isolated * {
    box-sizing: border-box;
}

/* ===========================================
   AUTH WRAPPER - LOGIN/REGISTER FORMS
   =========================================== */
.mpd-tax-isolated .mpd-tax-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mpd-tax-isolated .mpd-tax-auth-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.mpd-tax-isolated .mpd-tax-auth-header {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.mpd-tax-isolated .mpd-tax-auth-logo {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.mpd-tax-isolated .mpd-tax-auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.mpd-tax-isolated .mpd-tax-auth-header p {
    font-size: 15px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* ===========================================
   FORM ELEMENTS
   =========================================== */
.mpd-tax-isolated .mpd-tax-form {
    display: block;
}

.mpd-tax-isolated .mpd-tax-form-group {
    margin-bottom: 20px;
}

.mpd-tax-isolated .mpd-tax-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.mpd-tax-isolated .mpd-tax-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    line-height: 1.4;
}

.mpd-tax-isolated .mpd-tax-form-group label .required {
    color: #e53e3e;
    margin-left: 2px;
}

.mpd-tax-isolated .mpd-tax-form-group input[type="text"],
.mpd-tax-isolated .mpd-tax-form-group input[type="email"],
.mpd-tax-isolated .mpd-tax-form-group input[type="password"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #2d3748;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

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

.mpd-tax-isolated .mpd-tax-form-group small {
    display: block;
    font-size: 13px;
    color: #718096;
    margin-top: 6px;
    line-height: 1.4;
}

/* Checkbox */
.mpd-tax-isolated .mpd-tax-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}

.mpd-tax-isolated .mpd-tax-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
    padding: 0;
}

/* ===========================================
   BUTTONS
   =========================================== */
.mpd-tax-isolated .mpd-tax-button,
.mpd-tax-isolated .mpd-tax-form-actions button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.5;
    display: block;
}

.mpd-tax-isolated .mpd-tax-button:hover,
.mpd-tax-isolated .mpd-tax-form-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.mpd-tax-isolated .mpd-tax-button:active,
.mpd-tax-isolated .mpd-tax-form-actions button:active {
    transform: translateY(0);
}

.mpd-tax-isolated .mpd-tax-button:disabled,
.mpd-tax-isolated .mpd-tax-form-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===========================================
   MESSAGES
   =========================================== */
.mpd-tax-isolated .mpd-tax-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

.mpd-tax-isolated .mpd-tax-message-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.mpd-tax-isolated .mpd-tax-message-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* ===========================================
   FORM FOOTER
   =========================================== */
.mpd-tax-isolated .mpd-tax-form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #718096;
    line-height: 1.5;
}

.mpd-tax-isolated .mpd-tax-form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.mpd-tax-isolated .mpd-tax-form-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 600px) {
    .mpd-tax-isolated .mpd-tax-auth-box {
        padding: 24px;
    }
    
    .mpd-tax-isolated .mpd-tax-form-row {
        grid-template-columns: 1fr;
    }
    
    .mpd-tax-isolated .mpd-tax-auth-header h2 {
        font-size: 24px;
    }
}

/* ===========================================
   LOADING STATE
   =========================================== */
.mpd-tax-isolated .mpd-tax-loading {
    opacity: 0.7;
    pointer-events: none;
}

.mpd-tax-isolated .mpd-tax-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: mpd-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes mpd-spin {
    to { transform: rotate(360deg); }
}

/* ===========================================
   ANTI-CONFLICT OVERRIDES
   =========================================== */
.mpd-tax-isolated input,
.mpd-tax-isolated button,
.mpd-tax-isolated select,
.mpd-tax-isolated textarea {
    font-family: inherit;
}

.mpd-tax-isolated * {
    margin: initial;
    padding: initial;
}

.mpd-tax-isolated *:not(input):not(button):not(select):not(textarea) {
    margin: 0;
    padding: 0;
}
