/* Ebook Download Pro - Frontend Styles */
/* Exact design matching: Blue background, white input, orange button */

.edp-form-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.edp-form-container {
    background: var(--edp-bg-color, #3b5998);
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.edp-form-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Email Input Field */
.edp-input-group {
    flex: 1;
    position: relative;
}

.edp-email-input {
    width: 100%;
    height: 54px;
    padding: 0 20px;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
    box-sizing: border-box;
}

.edp-email-input::placeholder {
    color: #999;
    font-size: 15px;
}

.edp-email-input:focus {
    outline: none;
}

/* Download Button */
.edp-submit-btn {
    background: var(--edp-btn-color, #e8833a);
    color: #ffffff;
    border: none;
    padding: 0 35px;
    height: 54px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.edp-submit-btn:hover {
    background: var(--edp-btn-hover, #d4742e);
}

.edp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.edp-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: edp-spin 0.8s linear infinite;
}

.edp-submit-btn.loading .edp-spinner {
    display: inline-block;
}

.edp-submit-btn.loading .edp-btn-text {
    display: none;
}

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

/* Error Message */
.edp-error-message {
    display: none;
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
    text-align: center;
}

.edp-error-message.show {
    display: block;
}

/* Success Message */
.edp-success-message {
    display: none;
    text-align: center;
    padding: 20px;
}

.edp-success-message.show {
    display: block;
}

.edp-success-message .edp-success-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.edp-success-message .edp-success-icon svg {
    width: 30px;
    height: 30px;
    stroke: #fff;
}

.edp-success-message h4 {
    color: #fff;
    font-size: 18px;
    margin: 0 0 10px;
    font-weight: 600;
}

.edp-success-message p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
}

/* Download Progress */
.edp-download-progress {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: none;
}

.edp-download-progress.show {
    display: block;
}

.edp-download-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #fff;
    font-size: 14px;
}

.edp-download-item .edp-check {
    width: 20px;
    height: 20px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edp-download-item .edp-check svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
}

.edp-download-item.pending .edp-check {
    background: rgba(255, 255, 255, 0.3);
}

.edp-download-item.downloading .edp-check {
    background: #f59e0b;
    animation: edp-pulse 1s ease-in-out infinite;
}

@keyframes edp-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .edp-form-container {
        padding: 20px 15px;
    }
    
    .edp-form-inner {
        flex-direction: column;
        border-radius: 6px;
    }
    
    .edp-email-input {
        border-radius: 6px 6px 0 0;
        text-align: center;
    }
    
    .edp-submit-btn {
        border-radius: 0 0 6px 6px;
        width: 100%;
    }
}

/* Shake Animation for Error */
@keyframes edp-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.edp-form-inner.shake {
    animation: edp-shake 0.5s ease-in-out;
}

/* Hide form on success */
.edp-form-container.success .edp-form-inner {
    display: none;
}

.edp-form-container.success .edp-error-message {
    display: none;
}
