/* === DOWNLOAD BUTTON STYLES === */
.download-button {
    background-size: 18px 18px;
    max-width: 250px;
    border: 0;
    text-align: center;
    padding: 6px 15px;
    margin: 5px;
    line-height: 13.3333px;
    text-rendering: auto;
    color: #FFF !important;
    letter-spacing: normal;
    word-spacing: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    font: 13.3333px Arial;
    border: 1px solid #CCCCCC;
    background: #4E5461;
    cursor: pointer;
    text-decoration: none;
}

.download-button:hover {
    background: #5a6370;
}

.download-button:active {
    background: #3f4451;
}

.download-button:disabled {
    background: #999999;
    color: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
}

.download-button:disabled:hover {
    background: #999999;
}

.download-button:disabled:before {
    display: none;
}

/* Wariant z ikoną */
.download-button .icon {
    font-size: 13px;
}

/* === POPUP WIDGET STYLES === */

/* Backdrop overlay with blur */
.eep-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.eep-popup-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.eep-popup-widget {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 260px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, top 0s;
    max-height: 360px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.01em;
    opacity: 0;
    visibility: hidden;
}

.eep-popup-widget.show {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    visibility: visible;
}

.eep-popup-widget.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate(-50%, 0) scale(0.9) !important;
    pointer-events: none !important;
}

.eep-popup-header {
    background: #fafafa;
    color: #2c2c2c;
    padding: 12px 16px;
    border-radius: 2px 2px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8e8e8;
}

.eep-popup-title {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    color: #2c2c2c;
}

.eep-popup-title.updating {
    opacity: 0.6;
}

.eep-popup-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: color 0.2s ease;
    line-height: 1;
}

.eep-popup-close:hover {
    color: #2c2c2c;
}

.eep-popup-content {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

/* Responsywnosc popup-a na mniejszych ekranach */
@media (max-width: 768px) {
    .eep-popup-widget {
        width: calc(100vw - 60px);
        max-width: 320px;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .eep-popup-widget {
        width: calc(100vw - 40px);
        max-width: 280px;
    }
}

/* === SIMPLE POPUP WIDGET STYLES === */
.eep-simple-widget {
    padding: 0;
    text-align: center;
}

.eep-queue-status {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.eep-status-icon {
    font-size: 28px;
    color: #666;
}

.eep-status-text {
    font-size: 12px;
    color: #2c2c2c;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.eep-queue-position-wrapper {
    background: #fafafa;
    padding: 10px 16px;
    border-radius: 1px;
    border: 1px solid #e8e8e8;
    margin-top: 8px;
}

.eep-queue-number {
    color: #2c2c2c;
    font-weight: 400;
    font-size: 16px;
}

.eep-download-ready {
    padding: 12px 16px;
}

.eep-download-btn-simple {
    background: #2c2c2c;
    color: #ffffff;
    border: 1px solid #2c2c2c;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 400;
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.03em;
}

.eep-download-btn-simple:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.eep-download-btn-simple:active {
    background: #000000;
}

.eep-error-simple {
    padding: 12px 16px;
}

.eep-error-message {
    color: #d32f2f;
    font-weight: 400;
    padding: 12px 16px;
    background: #fff5f5;
    border: 1px solid #e8e8e8;
    border-radius: 1px;
    font-size: 12px;
}

/* Preparing status styles */
.eep-preparing-status {
    padding: 12px 16px;
    text-align: center;
}

.eep-preparing-text {
    color: #666;
    font-size: 12px;
    margin-top: 8px;
    letter-spacing: 0.01em;
}

/* Countdown styles */
.eep-countdown-wrapper {
    padding: 12px 16px;
    text-align: center;
}

.eep-countdown-text {
    color: #2c2c2c;
    font-size: 12px;
    margin-top: 8px;
}

.eep-countdown-number {
    color: #2c2c2c;
    font-weight: 400;
    font-size: 16px;
    background: #fafafa;
    padding: 2px 8px;
    border-radius: 1px;
    margin: 0 3px;
    border: 1px solid #e8e8e8;
}

/* Manual download info */
.eep-manual-info {
    color: #666;
    font-size: 11px;
    text-align: center;
    margin-top: 16px;
    padding: 10px;
    background: #fafafa;
    border-radius: 1px;
    border: 1px solid #e8e8e8;
}

.eep-manual-link {
    color: #2c2c2c;
    text-decoration: none;
    font-weight: 400;
    cursor: pointer;
    border-bottom: 1px solid #2c2c2c;
    transition: opacity 0.2s ease;
}

.eep-manual-link:hover {
    opacity: 0.7;
}

.eep-manual-link:hover {
    border-bottom-color: #3b82f6;
    color: #2563eb;
}

/* === IKONA ANIMATIONS === */
@keyframes eep-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.eep-icon-spin {
    animation: eep-spin 1s linear infinite;
    transform-origin: center center;
}

.eep-icon-pulse {
    animation: eep-pulse 2s ease-in-out infinite;
}

@keyframes eep-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}