/* Wrapper */
.cdb-wrapper {
    margin: 20px 0;
}

/* Alignment */
.cdb-align-left {
    text-align: left;
}

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

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

/* Container */
.cdb-container {
    display: inline-block;
}

.cdb-align-left .cdb-container {
    margin-right: auto;
}

.cdb-align-center .cdb-container {
    margin-left: auto;
    margin-right: auto;
}

.cdb-align-right .cdb-container {
    margin-left: auto;
}

/* Button */
.cdb-button {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.cdb-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Icon */
.cdb-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.cdb-icon svg,
.cdb-icon img {
    display: block;
}

/* Message */
.cdb-message {
    margin-top: 10px;
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    animation: cdbSlideDown 0.3s ease;
}

/* Download progress indicator */
.cdb-downloading {
    position: relative;
}

.cdb-downloading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    border-radius: inherit;
    animation: cdbPulse 1s ease-in-out infinite;
}

/* Animations */
@keyframes cdbSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cdbPulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* File type indicators */
.cdb-button[data-file-type="pdf"] .cdb-icon svg {
    color: #f40f02;
}

.cdb-button[data-file-type="zip"] .cdb-icon svg {
    color: #ff9800;
}

.cdb-button[data-file-type="image"] .cdb-icon svg {
    color: #4caf50;
}

/* Responsive */
@media (max-width: 768px) {
    .cdb-button {
        width: 100% !important;
    }
    
    .cdb-container {
        width: 100%;
    }
}

/* Loading spinner for downloads */
.cdb-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: cdbSpin 0.6s linear infinite;
}

@keyframes cdbSpin {
    to {
        transform: rotate(360deg);
    }
}