/* =============================================
   Batch Verifier Widget Styles
   ============================================= */

/* Container - matches bento glass-box style */
.verify-widget {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Decorative Top Bar */
/* Decorative Top Bar (Default Blue Flow) */
.verify-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #6b9ece, #667eea);
    background-size: 200% 100%;
    animation: gradientFlow 15s linear infinite;
    opacity: 0.9;
    z-index: 1;
    transition: opacity 0.5s ease;
}

/* Success Green Layer (Hidden by default, overlays the blue one) */
.verify-widget::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #22c55e;
    box-shadow: 0 0 20px #22c55e;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

/* When user focuses on input (interactive state) - affects base layer */
.verify-widget:focus-within::before {
    background: linear-gradient(90deg, #667eea, #764ba2, #f59e0b, #10b981, #667eea);
    background-size: 200% 100%;
}

/* Success State Controls */
.verify-widget.success-pulse::before,
.verify-widget.error-pulse::before {
    opacity: 0;
    /* Smoothly fade out blue layer */
}

.verify-widget.success-pulse::after {
    animation: successBlink 3.5s ease-in-out forwards;
}

.verify-widget.error-pulse::after {
    animation: errorBlink 3.5s ease-in-out forwards;
    background: #ef4444;
    box-shadow: 0 0 20px #ef4444;
}



@keyframes errorBlink {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
        box-shadow: 0 0 20px #ef4444;
    }

    25% {
        opacity: 0.1;
        box-shadow: none;
    }

    40% {
        opacity: 1;
        box-shadow: 0 0 20px #ef4444;
    }

    55% {
        opacity: 0.1;
        box-shadow: none;
    }

    70% {
        opacity: 1;
        box-shadow: 0 0 20px #ef4444;
    }

    85% {
        opacity: 1;
        box-shadow: 0 0 20px #ef4444;
    }

    100% {
        opacity: 0;
    }
}

@keyframes successBlink {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
        box-shadow: 0 0 20px #22c55e;
    }

    25% {
        opacity: 0.1;
        box-shadow: none;
    }

    40% {
        opacity: 1;
        box-shadow: 0 0 20px #22c55e;
    }

    55% {
        opacity: 0.1;
        box-shadow: none;
    }

    70% {
        opacity: 1;
        box-shadow: 0 0 20px #22c55e;
    }

    85% {
        opacity: 1;
        box-shadow: 0 0 20px #22c55e;
    }

    100% {
        opacity: 0;
    }

    /* Smoothly fade out green layer */
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.verify-widget:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

/* Header */
.verify-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.verify-widget-icon {
    width: 48px;
    height: 48px;
    /* Starry Blue Gradient (from Admin Studio) */
    background: linear-gradient(135deg, #6b9ece 0%, #5a8cba 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* Matching blue shadow */
    box-shadow: 0 4px 10px rgba(107, 158, 206, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.verify-widget-icon svg {
    width: 24px;
    height: 24px;
    z-index: 1;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.verify-widget-title {
    flex: 1;
}

.verify-widget-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.verify-widget-title p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Balance Display */
.verify-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #fbbf24;
}

.verify-balance i {
    font-size: 0.85rem;
}

/* Quota Display (1key remaining) */
.verify-quota {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #a5b4fc;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.verify-quota i {
    font-size: 0.85rem;
}

.verify-quota #verifyQuotaValue {
    font-weight: 600;
    color: #667eea;
}

.verify-quota.warning {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.verify-quota.warning #verifyQuotaValue {
    color: #fbbf24;
}

.verify-quota.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    animation: pulse 1.5s infinite;
}

.verify-quota.danger #verifyQuotaValue {
    color: #ef4444;
}

/* Input Area */
.verify-input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verify-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(107, 158, 206, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.verify-input:focus {
    outline: none;
    border-color: rgba(107, 158, 206, 0.7) !important;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 158, 206, 0.15) !important;
}

.verify-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Submit Button */
.verify-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    /* Starry Blue Gradient */
    background: linear-gradient(135deg, #6b9ece 0%, #5a8cba 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 158, 206, 0.4);
}

.verify-submit-btn:active {
    transform: translateY(0);
}

.verify-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.verify-submit-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Cancel Button */
.verify-cancel-btn {
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #fca5a5;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

.verify-cancel-btn:active {
    transform: translateY(0);
}

/* Price Info */
.verify-price-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.verify-price-info .price {
    color: #fbbf24;
    font-weight: 600;
}

.verify-price-info .per-price {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 4px;
}

/* Result Area */
.verify-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    display: none;
}

.verify-result.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.verify-result.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.verify-result.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.verify-result.pending {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.verify-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.verify-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.verify-result.success .verify-result-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.verify-result.error .verify-result-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.verify-result.pending .verify-result-icon {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.verify-result-title {
    font-weight: 600;
    font-size: 1rem;
}

.verify-result.success .verify-result-title {
    color: #22c55e;
}

.verify-result.error .verify-result-title {
    color: #ef4444;
}

.verify-result.pending .verify-result-title {
    color: #fbbf24;
}

.verify-result-message {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* History Link */
.verify-history-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.verify-history-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Prompt */
.verify-login-prompt {
    text-align: center;
    padding: 20px;
}

.verify-login-prompt p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.7);
}

.verify-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    /* Starry Blue Gradient */
    background: linear-gradient(135deg, #6b9ece 0%, #5a8cba 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 158, 206, 0.4);
}

/* Batch Mode - Textarea */
.verify-textarea {
    width: 100%;
    min-height: 200px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    /* Starry Blue Border */
    border: 1.5px solid rgba(107, 158, 206, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Inter', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.verify-textarea:focus {
    outline: none;
    border-color: rgba(107, 158, 206, 0.7) !important;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 158, 206, 0.15) !important;
}

.verify-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Batch Info */
.verify-batch-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
}

.verify-batch-count {
    display: flex;
    align-items: center;
    gap: 6px;
}

.verify-batch-count .count {
    color: #fbbf24;
    font-weight: 600;
}

/* Batch Results Panel */
.verify-batch-results {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-height: 350px;
    overflow-y: auto;
    display: none;
}

.verify-batch-results.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.verify-batch-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.verify-batch-results-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verify-batch-progress {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.verify-batch-progress .current {
    color: #667eea;
    font-weight: 600;
}

/* Individual Result Item */
.verify-result-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    animation: fadeInUp 0.3s ease;
}

.verify-result-item:last-child {
    margin-bottom: 0;
}

.verify-result-item.success {
    border-left: 3px solid #22c55e;
}

.verify-result-item.error {
    border-left: 3px solid #ef4444;
}

.verify-result-item.pending {
    border-left: 3px solid #fbbf24;
}

.verify-result-item.processing {
    border-left: 3px solid #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.verify-result-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.verify-result-item.success .verify-result-item-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.verify-result-item.error .verify-result-item-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.verify-result-item.pending .verify-result-item-icon {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.verify-result-item.processing .verify-result-item-icon {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    animation: pulse 1.5s infinite;
}

.verify-result-item.info {
    border-left: 3px solid #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.verify-result-item.info .verify-result-item-icon {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.verify-result-item-content {
    flex: 1;
    min-width: 0;
}

.verify-result-item-id {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.verify-result-item-message {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.verify-result-item.processing .verify-result-item-message {
    color: #a5b4fc;
}

/* Summary Stats */
.verify-batch-summary {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 12px;
}

.verify-batch-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.verify-batch-stat.success {
    color: #22c55e;
}

.verify-batch-stat.error {
    color: #ef4444;
}

.verify-batch-stat.total {
    color: rgba(255, 255, 255, 0.7);
}

/* Scrollbar for results */
.verify-batch-results::-webkit-scrollbar {
    width: 6px;
}

.verify-batch-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.verify-batch-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.verify-batch-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .verify-widget {
        padding: 18px;
    }

    .verify-widget-header {
        flex-wrap: wrap;
    }

    .verify-header-right {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .verify-history-item {
        flex-wrap: wrap;
        gap: 4px;
    }

    .verify-history-item-id {
        width: 100%;
    }
}

/* =============================================
   Header Right Area
   ============================================= */
.verify-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* API Quota Badge */
.verify-api-quota {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(102, 126, 234, 0.12);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #a5b4fc;
    border: 1px solid rgba(102, 126, 234, 0.25);
    font-weight: 600;
}

.verify-api-quota i {
    font-size: 0.85rem;
}

/* Quota Warning Bar */
.verify-quota-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 0.85rem;
    margin-bottom: 12px;
    animation: fadeInUp 0.3s ease;
}

.verify-quota-warning i {
    color: #ef4444;
    font-size: 1rem;
}

/* =============================================
   Verification History Card (Standalone)
   ============================================= */
.verify-history-card {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.verify-history-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.verify-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.verify-history-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.verify-history-title i {
    color: #a5b4fc;
}

.verify-history-refresh {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.verify-history-refresh:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* History Actions Group */
.verify-history-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.verify-history-export {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.verify-history-export:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* History List */
.verify-history-list {
    max-height: 280px;
    overflow-y: auto;
}

.verify-history-list::-webkit-scrollbar {
    width: 4px;
}

.verify-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.verify-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.verify-history-loading,
.verify-history-empty {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.verify-history-empty i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* History Item Row */
.verify-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    transition: background 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.verify-history-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.verify-history-item-time {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    white-space: nowrap;
    min-width: 80px;
}

.verify-history-item-id {
    flex: 1;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.verify-history-item-id:hover {
    color: rgba(255, 255, 255, 0.9);
}

.verify-history-item-status {
    white-space: nowrap;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.verify-history-item.success .verify-history-item-status {
    color: #22c55e;
}

.verify-history-item.error .verify-history-item-status {
    color: #ef4444;
}

.verify-history-item.cancelled .verify-history-item-status {
    color: rgba(255, 255, 255, 0.4);
}

.verify-history-item.processing .verify-history-item-status {
    color: #667eea;
}

.verify-history-item-cost {
    color: #fbbf24;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
    font-size: 0.75rem;
}