/* Card Support Frontend Styles */

.ucb-card-support-login,
.ucb-card-support-panel {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Login Page */
.ucb-login-container {
    max-width: 450px;
    margin: 60px auto;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.ucb-login-title {
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 30px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ucb-login-form {
    margin-top: 30px;
}

/* Panel Header */
.ucb-panel-header {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.ucb-panel-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.ucb-panel-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ucb-panel-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ucb-user-name {
    font-size: 16px;
    font-weight: 500;
}

/* Panel Container */
.ucb-panel-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .ucb-panel-container {
        grid-template-columns: 1fr;
    }
}

/* Sections */
.ucb-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.ucb-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Form Elements */
.ucb-form-group {
    margin-bottom: 20px;
}

.ucb-form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ucb-label {
    display: block;
    font-weight: 500;
    color: #50575e;
    margin-bottom: 8px;
    font-size: 14px;
}

.ucb-select,
.ucb-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
    font-family: inherit;
}

.ucb-select:focus,
.ucb-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Buttons */
.ucb-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.ucb-btn-primary {
    background: #2271b1;
    color: #fff;
}

.ucb-btn-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.ucb-btn-secondary {
    background: #646970;
    color: #fff;
}

.ucb-btn-secondary:hover {
    background: #50575e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 105, 112, 0.3);
}

.ucb-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.ucb-btn-block {
    width: 100%;
    justify-content: center;
}

.ucb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Messages */
.ucb-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
}

.ucb-message.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.ucb-message.error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Search Controls */
.ucb-search-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 25px;
    align-items: end;
}

@media (max-width: 768px) {
    .ucb-search-controls {
        grid-template-columns: 1fr;
    }
}

/* Results */
.ucb-codes-results {
    margin-top: 20px;
    min-height: 200px;
}

.ucb-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
}

.ucb-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.ucb-codes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    direction: rtl;
}

.ucb-codes-table th,
.ucb-codes-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

.ucb-codes-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1d2327;
    position: sticky;
    top: 0;
}

.ucb-codes-table tr:hover {
    background: #f8f9fa;
}

.ucb-code-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.ucb-code-badge.used {
    background: #f8d7da;
    color: #842029;
}

.ucb-code-badge.returned {
    background: #fff3cd;
    color: #856404;
}

.ucb-code-badge.available {
    background: #d1e7dd;
    color: #0f5132;
}

/* Pagination */
.ucb-pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.ucb-pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ucb-pagination button:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #2271b1;
}

.ucb-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ucb-pagination .current-page {
    padding: 8px 16px;
    font-weight: 600;
    color: #2271b1;
}

/* Logged in / Access denied states */
.ucb-card-support-logged-in,
.ucb-card-support-need-login,
.ucb-card-support-access-denied {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 40px auto;
}

.ucb-card-support-logged-in p,
.ucb-card-support-need-login p,
.ucb-card-support-access-denied p {
    font-size: 18px;
    color: #50575e;
    margin-bottom: 20px;
}

/* Loading animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 782px) {
    .ucb-panel-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ucb-panel-title {
        font-size: 22px;
    }
    
    .ucb-login-container {
        padding: 30px 20px;
    }
}

/* RTL Support */
body.rtl .ucb-codes-table {
    direction: rtl;
}

body.rtl .ucb-panel-header-content {
    flex-direction: row-reverse;
}

