/* CA Packs Content - Main Styles */

.ca-packs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ca-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.ca-pack-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.ca-pack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ca-pack-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.ca-pack-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ca-pack-card:hover .ca-pack-image img {
    transform: scale(1.05);
}

.ca-pack-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #999;
    font-size: 48px;
}

.ca-pack-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.ca-pack-content {
    padding: 20px;
}

.ca-pack-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.ca-pack-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ca-pack-preview {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.ca-preview-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #f0f0f0;
}

.ca-preview-more {
    width: 50px;
    height: 50px;
    background: #e91e63;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.ca-pack-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 12px;
    color: #999;
}

.ca-pack-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ca-buy-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.ca-buy-button:hover {
    background: linear-gradient(135deg, #c2185b, #ad1457);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.ca-buy-button:active {
    transform: translateY(0);
}

/* Dashboard Styles */
.ca-packs-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.ca-packs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ca-packs-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.ca-packs-actions {
    display: flex;
    gap: 12px;
}

.ca-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ca-btn-primary {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
}

.ca-btn-primary:hover {
    background: linear-gradient(135deg, #c2185b, #ad1457);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.ca-btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.ca-btn-secondary:hover {
    background: #e0e0e0;
    color: #333;
}

.ca-btn-success {
    background: #4caf50;
    color: white;
}

.ca-btn-warning {
    background: #ff9800;
    color: white;
}

.ca-btn-danger {
    background: #f44336;
    color: white;
}

.ca-packs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.ca-pack-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease;
}

.ca-pack-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ca-stat-icon {
    font-size: 32px;
    opacity: 0.8;
}

.ca-stat-content {
    flex: 1;
}

.ca-stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.ca-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Form Styles */
.ca-create-pack-form {
    max-width: 800px;
    margin: 0 auto;
}

.ca-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ca-form-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ca-form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ca-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ca-form-group {
    flex: 1;
}

.ca-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ca-form-group input,
.ca-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.ca-form-group input:focus,
.ca-form-group textarea:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.ca-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload Styles */
.ca-file-upload-area,
.ca-multi-upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.ca-file-upload-area:hover,
.ca-multi-upload-area:hover {
    border-color: #e91e63;
    background: #fdf2f8;
}

.ca-upload-placeholder {
    pointer-events: none;
}

.ca-upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.ca-upload-text {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ca-upload-info {
    color: #999;
    font-size: 12px;
}

.ca-files-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.ca-file-item {
    position: relative;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.ca-file-item:hover {
    border-color: #e91e63;
}

.ca-file-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.ca-video-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.ca-file-name {
    font-size: 12px;
    color: #666;
    word-break: break-all;
    margin-bottom: 4px;
}

.ca-file-size {
    font-size: 11px;
    color: #999;
}

/* Summary Styles */
.ca-pack-summary {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ca-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ca-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ca-summary-label {
    font-weight: 500;
    color: #666;
}

.ca-summary-value {
    font-weight: 600;
    color: #333;
}

.ca-status-ok {
    color: #22c55e;
    font-weight: 600;
}

.ca-status-error {
    color: #ef4444;
    font-weight: 600;
}

.ca-status-warning {
    color: #f59e0b;
    font-weight: 600;
}

/* Form Actions */
.ca-form-actions {
    text-align: center;
    margin-top: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ca-btn-submit {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ca-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #c2185b, #ad1457);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}

.ca-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ca-btn-loading {
    display: none;
}

.ca-btn-submit:disabled .ca-btn-text {
    display: none;
}

.ca-btn-submit:disabled .ca-btn-loading {
    display: inline;
}

/* Empty State */
.ca-packs-empty {
    text-align: center;
    padding: 60px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ca-empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.4;
}

.ca-packs-empty h4 {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 20px;
}

.ca-packs-empty p {
    margin: 0 0 24px 0;
    color: #999;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Withdrawal Section */
.ca-packs-withdrawal-section {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    padding: 24px;
    border-radius: 12px;
    margin-top: 32px;
    border: 1px solid #bbf7d0;
}

.ca-withdrawal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ca-btn-withdrawal {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ca-btn-withdrawal:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ca-packs-grid {
        grid-template-columns: 1fr;
    }
    
    .ca-packs-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .ca-packs-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ca-form-row {
        flex-direction: column;
    }
    
    .ca-form-actions {
        padding: 16px;
    }
    
    .ca-btn-submit {
        width: 100%;
        padding: 16px;
    }
    
    .ca-withdrawal-info {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ca-packs-container {
        padding: 12px;
    }
    
    .ca-packs-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ca-summary-stats {
        grid-template-columns: 1fr;
    }
    
    .ca-files-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ca-pack-card {
    animation: fadeInUp 0.6s ease-out;
}

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

.ca-btn-loading {
    animation: pulse 1.5s infinite;
}

/* Loading States */
.ca-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ca-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e91e63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.ca-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.ca-toast.show {
    transform: translateX(0);
}

.ca-toast-success {
    border-left: 4px solid #22c55e;
}

.ca-toast-error {
    border-left: 4px solid #ef4444;
}

.ca-toast-warning {
    border-left: 4px solid #f59e0b;
}

/* Accessibility */
.ca-btn:focus,
.ca-form-group input:focus,
.ca-form-group textarea:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ca-packs-actions,
    .ca-form-actions,
    .ca-packs-withdrawal-section {
        display: none;
    }
}