/**
 * DAMT Token Sale Widget Styles - UPDATED VERSION
 * Version: 1.0.4
 * Location: assets/css/widget.css
 */

.damt-token-sale-widget {
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.damt-widget-header {
    margin-bottom: 12px;
}

.damt-widget-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.damt-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.damt-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.damt-status-dot.inactive {
    background: #ef4444;
}

.damt-sale-stats {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    font-size: 11px;
}

.damt-stat-label {
    color: #64748b;
    margin-bottom: 2px;
}

.damt-stat-value {
    font-weight: 600;
    font-size: 13px;
}

.damt-section-label {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    font-weight: 500;
}

/* UPDATED: Smaller wallet grid */
.damt-wallet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

/* UPDATED: Smaller wallet buttons */
.damt-wallet-btn {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 6px;
    padding: 8px 4px;
    min-height: 60px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: 10px;
}

.damt-wallet-btn:hover:not(:disabled) {
    background: rgba(71, 85, 105, 0.5);
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.damt-wallet-btn:active {
    transform: translateY(0);
}

.damt-wallet-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* UPDATED: Smaller wallet icons */
.damt-wallet-icon {
    font-size: 20px;
    line-height: 1;
    display: block;
    height: 22px;
    width: 22px;
    text-align: center;
}

/* UPDATED: Smaller wallet name */
.damt-wallet-name {
    font-size: 9px;
    line-height: 1.2;
    color: #cbd5e1;
    text-align: center;
    display: block;
    margin-top: 2px;
}

.damt-connected-wallet {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.damt-check-icon {
    color: #22c55e;
    margin-right: 6px;
}

#damt-disconnect-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

#damt-disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.damt-currency-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.damt-currency-btn {
    flex: 1;
    padding: 8px;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.damt-currency-btn:hover {
    background: rgba(71, 85, 105, 0.5);
}

.damt-currency-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #3b82f6;
}

.damt-amount-input-wrapper {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
}

.damt-input-label {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
}

#damt-amount-input {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    padding: 0;
}

#damt-amount-input::-webkit-inner-spin-button,
#damt-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#damt-amount-input {
    -moz-appearance: textfield;
}

.damt-conversion-text {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

.damt-purchase-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.damt-purchase-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.damt-purchase-btn:disabled {
    background: rgba(71, 85, 105, 0.5);
    cursor: not-allowed;
    transform: none;
}

.damt-info-note {
    margin-top: 12px;
    padding: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    font-size: 10px;
    color: #93c5fd;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.damt-spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: damt-spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

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

#damt-tx-status {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11px;
    display: none;
    line-height: 1.6;
}

#damt-tx-status.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

#damt-tx-status.success strong {
    color: #fff;
    display: block;
    margin-bottom: 6px;
}

#damt-tx-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

#damt-tx-status.error strong {
    color: #fff;
    display: block;
    margin-bottom: 6px;
}

#damt-tx-status.pending {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

#damt-tx-status a {
    color: #60a5fa;
    text-decoration: underline;
}

#damt-tx-status a:hover {
    color: #93c5fd;
}

.damt-hidden {
    display: none !important;
}

/* Mobile responsive improvements */
@media (max-width: 480px) {
    .damt-token-sale-widget {
        max-width: 100%;
        margin: 0;
    }
    
    .damt-wallet-grid {
        gap: 4px;
    }
    
    .damt-wallet-btn {
        padding: 6px 3px;
        min-height: 55px;
    }
    
    .damt-wallet-icon {
        font-size: 18px;
        height: 20px;
        width: 20px;
    }
    
    .damt-wallet-name {
        font-size: 8px;
    }
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    .damt-token-sale-widget {
        max-width: 100%;
    }
}