/**
 * DGI Wallet Pass - Frontend Styles
 * Version: 1.0.0
 */

/* Button Wrapper */
.dgi-wallet-button-wrapper {
    display: inline-block;
    position: relative;
    width: 100%;
    max-width: 400px;
}

/* Apple Wallet Badge Button */
.dgi-wallet-badge-button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-block;
}

.dgi-wallet-badge-button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.dgi-wallet-badge-button:active {
    transform: scale(0.98);
}

.dgi-wallet-badge-image {
    height: 50px;
    width: auto;
    display: block;
}

/* Responsive Badge */
@media (max-width: 600px) {
    .dgi-wallet-badge-image {
        height: 45px;
    }
}

/* Default Button Style */
.dgi-wallet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #003e6e 0%, #005a9c 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 62, 110, 0.15);
    cursor: pointer;
    border: none;
    width: 100%;
}

.dgi-wallet-button:hover {
    background: linear-gradient(135deg, #005a9c 0%, #0076cc 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 62, 110, 0.25);
    color: #ffffff;
    text-decoration: none;
}

.dgi-wallet-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 62, 110, 0.2);
}

.dgi-wallet-button:focus {
    outline: 2px solid #005a9c;
    outline-offset: 2px;
}

/* Button Icon */
.dgi-wallet-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Button Text */
.dgi-wallet-button-text {
    flex: 1;
}

/* Minimal Style */
.dgi-wallet-button-minimal {
    background: transparent;
    color: #003e6e;
    border: 2px solid #003e6e;
    box-shadow: none;
}

.dgi-wallet-button-minimal:hover {
    background: #003e6e;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Icon Only Style */
.dgi-wallet-button-icon-only {
    padding: 14px;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    justify-content: center;
}

.dgi-wallet-button-icon-only .dgi-wallet-button-text {
    display: none;
}

/* Loading State */
.dgi-wallet-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 28px;
    background: #f0f0f0;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
}

.dgi-wallet-loading.active {
    display: flex;
}

.dgi-wallet-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 62, 110, 0.1);
    border-top-color: #003e6e;
    border-radius: 50%;
    animation: dgi-wallet-spin 0.8s linear infinite;
}

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

/* Message */
.dgi-wallet-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.dgi-wallet-message.active {
    display: block;
}

.dgi-wallet-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dgi-wallet-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dgi-wallet-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Error Display */
.dgi-wallet-error {
    padding: 16px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    margin: 16px 0;
}

.dgi-wallet-error strong {
    display: block;
    margin-bottom: 8px;
    color: #856404;
    font-size: 16px;
}

.dgi-wallet-error p {
    margin: 8px 0;
    color: #856404;
    line-height: 1.5;
}

.dgi-wallet-error ul {
    margin: 8px 0 8px 20px;
    color: #856404;
}

.dgi-wallet-error li {
    margin: 4px 0;
}

/* Success State */
.dgi-wallet-success {
    padding: 16px;
    background: #d4edda;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    margin: 16px 0;
    color: #155724;
}

/* Responsive */
@media (max-width: 600px) {
    .dgi-wallet-button-wrapper {
        max-width: 100%;
    }
    
    .dgi-wallet-button {
        font-size: 15px;
        padding: 14px 24px;
    }
    
    .dgi-wallet-button-icon-only {
        width: 48px;
        height: 48px;
        padding: 12px;
    }
    
    .dgi-wallet-icon {
        width: 22px;
        height: 22px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dgi-wallet-loading {
        background: #2c2c2c;
        color: #e0e0e0;
    }
    
    .dgi-wallet-error {
        background: #4a3f00;
        border-color: #ffc107;
    }
    
    .dgi-wallet-error,
    .dgi-wallet-error strong,
    .dgi-wallet-error p,
    .dgi-wallet-error li {
        color: #ffd54f;
    }
    
    .dgi-wallet-message.success {
        background: #1e4620;
        color: #a3d9a5;
        border-color: #4a7c59;
    }
    
    .dgi-wallet-message.error {
        background: #4a1f1f;
        color: #f5b7b1;
        border-color: #884447;
    }
    
    .dgi-wallet-message.info {
        background: #1f3a4a;
        color: #a3c9d9;
        border-color: #476b7c;
    }
}

/* Print Styles */
@media print {
    .dgi-wallet-button-wrapper {
        display: none;
    }
}

/* Accessibility */
.dgi-wallet-button:focus-visible {
    outline: 3px solid #005a9c;
    outline-offset: 2px;
}

/* Animation for success state */
@keyframes dgi-wallet-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dgi-wallet-message.active {
    animation: dgi-wallet-fadeIn 0.3s ease-out;
}

/* Apple Wallet Badge (optional) */
.dgi-wallet-badge {
    display: inline-block;
    margin-top: 12px;
}

.dgi-wallet-badge img {
    height: 40px;
    width: auto;
    transition: transform 0.2s;
}

.dgi-wallet-badge img:hover {
    transform: scale(1.05);
}
