/**
 * X User ID Manager - Frontend Styles
 */

/* Container */
.xuim-frontend-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Form */
.xuim-login-form-wrapper {
    max-width: 450px;
    margin: 50px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.xuim-login-form-wrapper h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Form Elements */
.xuim-frontend-form {
    width: 100%;
}

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

.xuim-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

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

.xuim-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.xuim-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.xuim-input-sm {
    width: 60px;
    padding: 6px 10px;
    font-size: 14px;
}

textarea.xuim-input {
    resize: vertical;
    min-height: 100px;
}

.xuim-help {
    margin: 5px 0 0;
    font-size: 13px;
    color: #666;
}

/* Buttons */
.xuim-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    line-height: 1.5;
}

.xuim-btn-primary {
    background: #2271b1;
    color: #fff;
}

.xuim-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.xuim-btn-secondary {
    background: #f0f0f1;
    color: #2c3338;
}

.xuim-btn-secondary:hover {
    background: #dcdcde;
    color: #2c3338;
}

.xuim-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.xuim-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.xuim-form-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

/* Messages */
.xuim-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.xuim-message p {
    margin: 0;
}

.xuim-message.xuim-success {
    background: #d7f3e3;
    border-left: 4px solid #00a32a;
    color: #00401a;
}

.xuim-message.xuim-error {
    background: #fce8e8;
    border-left: 4px solid #d63638;
    color: #5e0d0f;
}

.xuim-message.xuim-warning {
    background: #fef8e7;
    border-left: 4px solid #dba617;
    color: #5a4508;
}

/* Validation Messages */
.xuim-validation-message {
    margin-top: 8px;
    font-size: 13px;
}

.xuim-validating {
    color: #999;
    font-style: italic;
}

.xuim-success {
    color: #00a32a;
    font-weight: 500;
}

.xuim-error {
    color: #d63638;
    font-weight: 500;
}

/* Login Footer */
.xuim-login-footer {
    margin-top: 25px;
    text-align: center;
}

.xuim-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.xuim-info .dashicons {
    font-size: 18px;
}

/* Dashboard */
.xuim-dashboard {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
}

/* Dashboard Header */
.xuim-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f0f0f1;
    border-bottom: 1px solid #ddd;
}

.xuim-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.xuim-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.xuim-user-details {
    display: flex;
    flex-direction: column;
}

.xuim-user-details strong {
    font-size: 16px;
    color: #333;
}

.xuim-user-details small {
    font-size: 13px;
    color: #666;
}

/* Tabs */
.xuim-tabs {
    display: flex;
    background: #f0f0f1;
    border-bottom: 1px solid #ddd;
}

.xuim-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
}

.xuim-tab:hover {
    background: #e5e5e5;
    color: #333;
}

.xuim-tab.active {
    background: #fff;
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.xuim-tab .dashicons {
    font-size: 18px;
}

/* Tab Content */
.xuim-tab-content {
    display: none;
    padding: 30px;
}

.xuim-tab-content.active {
    display: block;
}

.xuim-tab-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
}

/* List Header */
.xuim-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.xuim-search-box {
    display: flex;
    gap: 10px;
}

.xuim-search-box .xuim-input {
    width: 300px;
}

/* Pagination */
.xuim-pagination {
    display: flex;
    align-items: center;
    gap: 15px;
}

.xuim-pagination-controls {
    display: flex;
    gap: 5px;
}

.xuim-page-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.xuim-total-items {
    font-size: 14px;
    color: #666;
}

/* Table */
.xuim-table-wrapper {
    overflow-x: auto;
}

.xuim-table {
    width: 100%;
    border-collapse: collapse;
}

.xuim-table thead {
    background: #f0f0f1;
}

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

.xuim-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f1;
}

.xuim-table tbody tr:hover {
    background: #f9f9f9;
}

.xuim-table tbody tr:last-child td {
    border-bottom: none;
}

.xuim-loading,
.xuim-no-data {
    text-align: center;
    padding: 40px !important;
    color: #999;
    font-style: italic;
}

/* Badges */
.xuim-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
}

.xuim-badge-create {
    background: #00a32a;
}

.xuim-badge-update {
    background: #2271b1;
}

.xuim-badge-merge {
    background: #dba617;
}

.xuim-badge-delete {
    background: #d63638;
}

/* Status */
.xuim-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.xuim-status-active {
    background: #d7f3e3;
    color: #00a32a;
}

.xuim-status-suspended {
    background: #fef8e7;
    color: #dba617;
}

.xuim-status-deleted {
    background: #fce8e8;
    color: #d63638;
}

/* Logged In State */
.xuim-logged-in {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.xuim-logged-in p {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Loading Animation */
@keyframes xuim-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.xuim-loading {
    animation: xuim-pulse 1.5s ease-in-out infinite;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .xuim-login-form-wrapper {
        padding: 30px 20px;
    }
    
    .xuim-dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .xuim-user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .xuim-tabs {
        flex-direction: column;
    }
    
    .xuim-tab {
        border-bottom: 1px solid #ddd;
        border-left: 3px solid transparent;
    }
    
    .xuim-tab.active {
        border-left-color: #2271b1;
        border-bottom-color: #ddd;
    }
    
    .xuim-list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .xuim-search-box {
        flex-direction: column;
    }
    
    .xuim-search-box .xuim-input {
        width: 100%;
    }
    
    .xuim-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .xuim-table-wrapper {
        overflow-x: scroll;
    }
    
    .xuim-table {
        min-width: 600px;
    }
}

/* User Badge Styles */
.xuim-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.xuim-user-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.xuim-user-frontend {
    background: #e5f5fa;
    color: #2271b1;
    border: 1px solid #a7d7f0;
}

.xuim-user-admin {
    background: #d7f3e3;
    color: #00a32a;
    border: 1px solid #a0d9b4;
}

.xuim-user-unknown {
    background: #f0f0f1;
    color: #666;
    border: 1px solid #ddd;
}

.xuim-text-muted {
    color: #999;
    font-style: italic;
}

/* Search Box Highlight */
.xuim-search-box .xuim-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Table Enhancements */
.xuim-table tbody tr:hover {
    background: #f9f9f9;
    transition: background-color 0.2s;
}

.xuim-table td {
    vertical-align: middle;
}

.xuim-table td small {
    display: block;
    margin-top: 4px;
    color: #666;
}

/* Print Styles */
@media print {
    .xuim-dashboard-header,
    .xuim-tabs,
    .xuim-form-actions,
    .xuim-btn {
        display: none !important;
    }
    
    .xuim-user-badge {
        border: 1px solid #000;
        background: #fff !important;
        color: #000 !important;
    }
}

