/* ==========================================
   Donation Download Center - Frontend Styles
   ========================================== */

/* RTL Support */
body[dir="rtl"] .ddc-product-card {
    text-align: right;
}

/* Product Actions */
.ddc-product-actions {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.ddc-download-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.ddc-download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ddc-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ddc-download-count,
.ddc-version,
.ddc-update-date {
    display: inline-block;
    margin: 10px 15px 10px 0;
    color: #666;
    font-size: 14px;
}

/* Donation Section */
.ddc-donation-section {
    text-align: center;
}

.ddc-donation-message {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
    font-weight: 500;
}

.ddc-donate-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.ddc-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

/* Products Grid */
.ddc-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.ddc-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ddc-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ddc-product-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.ddc-product-content {
    padding: 20px;
}

.ddc-product-type {
    font-size: 24px;
    display: inline-block;
    margin-bottom: 10px;
}

.ddc-product-title {
    margin: 10px 0;
    font-size: 20px;
}

.ddc-product-title a {
    color: #333;
    text-decoration: none;
}

.ddc-product-title a:hover {
    color: #667eea;
}

.ddc-product-excerpt {
    color: #666;
    font-size: 14px;
    margin: 15px 0;
    line-height: 1.6;
}

.ddc-product-meta {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.ddc-meta-item {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}

.ddc-product-actions-compact {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.ddc-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.ddc-btn-download {
    background: #667eea;
    color: white;
}

.ddc-btn-download:hover {
    background: #5568d3;
}

.ddc-btn-donate {
    background: #f5576c;
    color: white;
}

.ddc-btn-donate:hover {
    background: #e04455;
}

/* Donation Modal */
.ddc-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.ddc-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ddc-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.ddc-modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.ddc-close {
    color: white;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.ddc-close:hover {
    background: rgba(255,255,255,0.2);
}

.ddc-modal-body {
    padding: 30px;
}

.ddc-donation-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.ddc-donation-option {
    text-align: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ddc-donation-option:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.ddc-donation-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.ddc-donation-option .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.ddc-donation-option .label {
    font-weight: bold;
    margin-bottom: 5px;
}

.ddc-donation-option .price {
    color: #667eea;
    font-size: 18px;
    font-weight: bold;
}

.ddc-donor-info {
    margin-bottom: 20px;
}

.ddc-donor-info label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.ddc-donor-info input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.ddc-donor-info input[type="text"]:focus {
    border-color: #667eea;
    outline: none;
}

.ddc-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.ddc-checkbox-group input[type="checkbox"] {
    margin-left: 8px;
    width: 18px;
    height: 18px;
}

.ddc-submit-donation {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ddc-submit-donation:hover {
    transform: translateY(-2px);
}

.ddc-submit-donation:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.ddc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .ddc-products-grid {
        grid-template-columns: 1fr;
    }
    
    .ddc-donation-options {
        grid-template-columns: 1fr;
    }
    
    .ddc-modal-content {
        width: 95%;
        margin: 10% auto;
    }
}
