/**
 * Pledge Manager Styles - استایل‌های فرم سرمایه‌گذاری
 */

/* Main pledge section */
.crdfund-pledge-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
}

.crdfund-pledge-section h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Project stats */
.crdfund-project-stats {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.crdfund-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.crdfund-stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.crdfund-stat-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.crdfund-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

/* Progress bar */
.crdfund-progress-bar {
    position: relative;
    background: #e9ecef;
    border-radius: 20px;
    height: 30px;
    overflow: hidden;
    margin-bottom: 10px;
}

.crdfund-progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    border-radius: 20px;
    transition: width 0.3s ease;
    position: relative;
}

.crdfund-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
    z-index: 2;
}

/* Pledge form */
.crdfund-pledge-form-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.crdfund-pledge-amount-section {
    margin-bottom: 25px;
}

.crdfund-pledge-amount-section label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.crdfund-amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 5px;
    transition: border-color 0.3s ease;
}

.crdfund-amount-input-wrapper:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.crdfund-amount-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    outline: none;
}

.crdfund-currency {
    background: #3498db;
    color: white;
    padding: 12px 15px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
}

.crdfund-amount-info {
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

/* Pledge button */
.crdfund-pledge-actions {
    text-align: center;
    margin-bottom: 20px;
}

.crdfund-pledge-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    min-width: 200px;
}

.crdfund-pledge-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.crdfund-pledge-btn:active {
    transform: translateY(0);
}

.crdfund-pledge-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Login section */
.crdfund-login-required {
    text-align: center;
    padding: 30px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.crdfund-login-required p {
    font-size: 16px;
    color: #856404;
    margin-bottom: 25px;
}

.crdfund-quick-login {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.crdfund-quick-login h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

.crdfund-login-field {
    margin-bottom: 15px;
}

.crdfund-login-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.crdfund-login-field input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.crdfund-login-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.crdfund-login-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.crdfund-login-btn:hover {
    background: #2980b9;
}

.crdfund-register-link {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 25px;
    border: 2px solid #3498db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.crdfund-register-link:hover {
    background: #3498db;
    color: white;
}

/* Messages */
.crdfund-pledge-messages,
.crdfund-login-messages {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}

.crdfund-pledge-messages.success,
.crdfund-login-messages.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.crdfund-pledge-messages.error,
.crdfund-login-messages.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

/* Loop pledge info */
.crdfund-loop-pledge-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    direction: rtl;
    text-align: right;
}

.crdfund-loop-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.crdfund-loop-label {
    color: #6c757d;
    font-weight: 500;
}

.crdfund-loop-value {
    color: #2c3e50;
    font-weight: bold;
}

.crdfund-loop-progress {
    margin-bottom: 15px;
}

.crdfund-loop-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 5px;
}

.crdfund-loop-progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.crdfund-loop-progress-text {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.crdfund-loop-action {
    text-align: center;
}

.crdfund-loop-pledge-btn {
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s ease;
}

.crdfund-loop-pledge-btn:hover {
    background: #2980b9;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .crdfund-pledge-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .crdfund-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .crdfund-pledge-form-container,
    .crdfund-project-stats {
        padding: 15px;
    }
    
    .crdfund-pledge-btn {
        padding: 12px 30px;
        font-size: 16px;
        min-width: 180px;
    }
    
    .crdfund-login-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .crdfund-login-btn,
    .crdfund-register-link {
        width: 100%;
        text-align: center;
    }
}

/* Loading states */
.crdfund-loading {
    opacity: 0.7;
    pointer-events: none;
}

.crdfund-btn-loading {
    display: inline-block;
}

.crdfund-loading .crdfund-btn-text {
    display: none;
}

/* Animation for success */
@keyframes crdfund-success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.crdfund-success-animation {
    animation: crdfund-success-pulse 0.6s ease-in-out;
}