/* Button Wrapper */
.scfd-button-wrapper {
    margin: 1em 0;
    clear: both;
}

/* --- NEW: Spinner Styles --- */
.scfd-spinner {
    display: inline-block;
    visibility: hidden;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: scfd-spin 1s ease-in-out infinite;
    margin-left: 0.75em;
    /* Gap between text and spinner */
}

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

/* Modal styles */
.scfd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.scfd-modal-content {
    margin: auto;
    padding: 25px 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    box-sizing: border-box;
}

.scfd-modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.scfd-modal-content p {
    margin-bottom: 20px;
}

.scfd-modal-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.02);
}

.scfd-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.scfd-modal-actions button {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: opacity 0.2s;
}

.scfd-modal-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scfd-modal-error {
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 10px;
    display: none;
    text-align: left;
}

@media (max-width: 480px) {
    .scfd-modal-content {
        padding: 20px;
    }

    .scfd-modal-content h3 {
        font-size: 1.2em;
    }

    .scfd-modal-actions {
        flex-direction: column;
    }
}