/**
 * RWA Staking Wallet Connect Styles - Professional Redesign
 * Version: 7.0.0
 * Premium financial interface design
 */

:root {
    /* Enhanced Color Palette - Premium Financial */
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #3b82f6;
    
    /* Professional Background Colors */
    --background-dark: #0f172a;
    --background-darker: #0a0f1c;
    --background-card: #1e293b;
    --background-card-hover: #27334c;
    --background-card-light: #334155;
    
    /* Premium Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-disabled: #475569;
    
    /* Professional Border Colors */
    --border-color: #334155;
    --border-light: #475569;
    --border-accent: #3b82f6;
    
    /* Status Colors */
    --success-color: #10b981;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Enhanced Shadows */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Professional Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
}

/* Base Reset & Global Styles */
.rwa-staking-dashboard {
    background: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Header Section - Premium Design */
.rwa-staking-header {
    background: var(--background-darker);
    border-bottom: 1px solid var(--border-color);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.rwa-staking-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-blue) 50%, transparent 100%);
    opacity: 0.6;
}

.rwa-staking-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-blue) 50%, transparent 100%);
    opacity: 0.3;
}

.rwa-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.rwa-staking-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.rwa-staking-subtitle {
    font-size: 1.375rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Enhanced Main Container */
.rwa-staking-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.rwa-staking-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

/* Premium Sidebar Styles */
.rwa-staking-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 40px;
}

/* Professional Wallet Section */
.rwa-wallet-connect-wrapper {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rwa-wallet-connect-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rwa-wallet-connect-wrapper:hover::before {
    opacity: 1;
}

.rwa-wallet-connect-wrapper:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.rwa-connect-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    height: 52px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0;
}

.rwa-connect-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.rwa-connect-button:hover::before {
    left: 100%;
}

.rwa-connect-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.rwa-connect-button:active {
    transform: translateY(0);
}

.rwa-connect-button.rwa-connected {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.rwa-wallet-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rwa-wallet-address-section,
.rwa-wallet-balance-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 0;
}

.rwa-wallet-address-section:last-child,
.rwa-wallet-balance-section:last-child {
    margin-bottom: 0;
}

.rwa-wallet-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.rwa-wallet-address {
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: var(--background-darker);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.rwa-wallet-balance {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Professional Stats Section */
.rwa-stats-section {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 32px;
    transition: all 0.3s ease;
}

.rwa-stats-section:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.rwa-stats-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 28px 0;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 12px;
}

.rwa-stats-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.rwa-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rwa-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.rwa-stat-item:hover {
    border-color: var(--border-accent);
}

.rwa-stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.rwa-stat-label {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.rwa-stat-value {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.rwa-stat-value.highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Premium Staking Card */
.rwa-staking-card {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rwa-staking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rwa-staking-card:hover::before {
    opacity: 1;
}

.rwa-staking-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.rwa-staking-card-header {
    background: var(--background-darker);
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.rwa-staking-card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-blue) 50%, transparent 100%);
}

.rwa-staking-card-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.rwa-apy-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: var(--success-gradient);
    padding: 16px 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.rwa-apy-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.rwa-apy-display:hover::before {
    left: 100%;
}

.rwa-apy-value {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.rwa-apy-label {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
    position: relative;
    z-index: 2;
}

.rwa-staking-card-body {
    padding: 40px;
}

/* Professional Form Elements */
.rwa-form-group {
    margin-bottom: 32px;
}

.rwa-form-label {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.rwa-form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rwa-balance-info {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.rwa-currency-selector {
    position: relative;
}

.rwa-currency-select {
    background: var(--background-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 52px 16px 20px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 56px;
}

.rwa-currency-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rwa-currency-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.rwa-currency-select:focus + .rwa-currency-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Enhanced Amount Input */
.rwa-amount-input-wrapper {
    position: relative;
}

.rwa-stake-input {
    background: var(--background-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 90px 16px 20px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s ease;
    height: 56px;
    font-family: 'Courier New', monospace;
}

.rwa-stake-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rwa-max-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.rwa-max-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow);
}

/* Professional Conversion Display */
.rwa-conversion-display {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--info-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 24px 0;
    transition: all 0.3s ease;
}

.rwa-conversion-display:hover {
    border-color: var(--primary-blue);
    transform: translateY(-1px);
}

.rwa-conversion-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwa-conversion-text {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Premium Staking Summary */
.rwa-staking-summary {
    background: var(--background-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin: 40px 0;
    transition: all 0.3s ease;
    position: relative;
}

.rwa-staking-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rwa-staking-summary:hover::before {
    opacity: 1;
}

.rwa-staking-summary:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.rwa-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.rwa-summary-item:hover {
    border-color: var(--border-accent);
}

.rwa-summary-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.rwa-summary-label {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.rwa-summary-value {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Professional Staking Action */
.rwa-staking-action {
    margin: 40px 0 24px;
}

.rwa-stake-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 64px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0;
}

.rwa-stake-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.rwa-stake-button:hover::before {
    left: 100%;
}

.rwa-stake-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.rwa-stake-button:active:not(:disabled) {
    transform: translateY(-1px);
}

.rwa-stake-button:disabled {
    background: var(--text-disabled);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Professional Info Note */
.rwa-info-note {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--info-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.rwa-info-note:hover {
    border-color: var(--primary-blue);
    transform: translateY(-1px);
}

.rwa-info-note p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    text-align: center;
    font-weight: 500;
}

/* Enhanced Transaction History */
.rwa-transaction-history {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 32px;
    transition: all 0.3s ease;
}

.rwa-transaction-history:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.rwa-transaction-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 28px 0;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 12px;
}

.rwa-transaction-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Professional Modal */
.rwa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.rwa-modal-content {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: 0;
    max-width: 440px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rwa-modal-header {
    padding: 28px 32px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-darker);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.rwa-modal-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.rwa-modal-body {
    padding: 32px;
}

/* Enhanced Loading Spinner */
.rwa-loading-spinner {
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Professional Responsive Design */
@media (max-width: 1200px) {
    .rwa-staking-container {
        grid-template-columns: 380px 1fr;
        gap: 32px;
    }
}

@media (max-width: 1024px) {
    .rwa-staking-container {
        grid-template-columns: 350px 1fr;
        gap: 28px;
    }
    
    .rwa-staking-card-header {
        padding: 32px;
    }
    
    .rwa-staking-card-body {
        padding: 32px;
    }
}

@media (max-width: 968px) {
    .rwa-staking-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .rwa-staking-sidebar {
        position: static;
        order: 2;
    }
    
    .rwa-staking-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .rwa-staking-header {
        padding: 60px 0 40px;
    }
    
    .rwa-staking-title {
        font-size: 2.5rem;
    }
    
    .rwa-staking-subtitle {
        font-size: 1.25rem;
    }
    
    .rwa-staking-main {
        padding: 40px 16px;
    }
    
    .rwa-staking-card-header {
        padding: 28px;
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .rwa-apy-display {
        align-items: flex-start;
    }
    
    .rwa-staking-card-body {
        padding: 28px;
    }
    
    .rwa-wallet-connect-wrapper,
    .rwa-stats-section,
    .rwa-transaction-history {
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .rwa-staking-title {
        font-size: 2rem;
    }
    
    .rwa-staking-subtitle {
        font-size: 1.125rem;
    }
    
    .rwa-header-content {
        padding: 0 16px;
    }
    
    .rwa-staking-main {
        padding: 32px 12px;
    }
    
    .rwa-staking-card-header,
    .rwa-staking-card-body {
        padding: 24px;
    }
    
    .rwa-wallet-connect-wrapper,
    .rwa-stats-section,
    .rwa-transaction-history {
        padding: 24px;
    }
    
    .rwa-apy-value {
        font-size: 2rem;
    }
}

/* Professional Utility Classes */
.rwa-hidden {
    display: none !important;
}

.rwa-text-center {
    text-align: center;
}

.rwa-text-right {
    text-align: right;
}

.rwa-gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rwa-success-text {
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Focus States for Accessibility */
.rwa-connect-button:focus,
.rwa-stake-button:focus,
.rwa-max-button:focus,
.rwa-stake-input:focus,
.rwa-currency-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Smooth transitions for all interactive elements */
.rwa-connect-button,
.rwa-stake-button,
.rwa-max-button,
.rwa-stake-input,
.rwa-currency-select,
.rwa-staking-card,
.rwa-wallet-connect-wrapper,
.rwa-stats-section,
.rwa-transaction-history,
.rwa-staking-summary,
.rwa-conversion-display,
.rwa-info-note {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional scrollbar for webkit browsers */
.rwa-staking-dashboard::-webkit-scrollbar {
    width: 8px;
}

.rwa-staking-dashboard::-webkit-scrollbar-track {
    background: var(--background-darker);
}

.rwa-staking-dashboard::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.rwa-staking-dashboard::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue-dark);
}