/**
 * DGI Wallet Pass - Frontend Styles
 * Version: 1.1.0 - Inline Layout Update
 */

/* Haupt-Container für die Buttons im Shortcode */
.dgi-wallet-shortcode-container {
    display: flex;
    flex-wrap: wrap;       /* Erlaubt Umbruch auf Handys */
    align-items: center;   /* Vertikale Zentrierung */
    gap: 15px;             /* Der gewünschte Abstand von 15px */
    margin: 20px 0;
}

/* Button Wrapper */
.dgi-wallet-button-wrapper {
    display: inline-block;
    position: relative;
    /* max-width entfernt, damit Buttons nebeneinander passen */
}

/* Apple & Google Wallet Badge Links/Buttons */
.dgi-save-to-wallet {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    line-height: 0; /* Verhindert Abstände unter Bildern */
}

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

.dgi-save-to-wallet:active {
    transform: scale(0.98);
}

/* Die Bilder (Badges) selbst */
.dgi-save-to-wallet img {
    height: 48px;  /* Einheitliche Höhe für beide Badges */
    width: auto;
    display: block;
    border-radius: 6px;
}

/* Falls CSS-Buttons statt Badges genutzt werden */
.dgi-wallet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 24px;
    height: 48px; /* Gleiche Höhe wie die Badges */
    background: linear-gradient(135deg, #003e6e 0%, #005a9c 100%);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap; /* Verhindert Textumbruch im Button */
}

.dgi-wallet-button:hover {
    background: linear-gradient(135deg, #005a9c 0%, #0076cc 100%);
    transform: translateY(-2px);
}

/* Message Box (nimmt volle Breite unter den Buttons ein) */
.dgi-wallet-message {
    flex-basis: 100%; /* Zwingt die Nachricht in eine neue Zeile */
    margin-top: 5px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    box-sizing: border-box;
}

/* Responsive: Auf sehr kleinen Bildschirmen untereinander */
@media (max-width: 480px) {
    .dgi-wallet-shortcode-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .dgi-save-to-wallet img {
        height: 44px;
    }
}

/* Loading Spinner Animation */
.dgi-save-to-wallet.loading {
    pointer-events: none;
    filter: grayscale(0.5);
    opacity: 0.7;
}

/* Status Farben */
.dgi-wallet-message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.dgi-wallet-message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .dgi-wallet-message.success { background: #1e4620; color: #a3d9a5; border-color: #4a7c59; }
    .dgi-wallet-message.error { background: #4a1f1f; color: #f5b7b1; border-color: #884447; }
}