/**
 * Frontend Styles for Give Frontend Campaign Creator
 *
 * @package GiveFrontendCampaign
 * @author Wbcom Designs
 * @since 1.0.0
 */

/* Campaign Form Styles */
.gfcc-campaign-form-wrapper {
    max-width: 800px;
    margin: 20px 0;
}

.gfcc-form-section {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gfcc-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4em;
    border-bottom: 2px solid #28C77B;
    padding-bottom: 10px;
}

.gfcc-form-row {
    margin-bottom: 20px;
}

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

.gfcc-form-row label.gfcc-required:after {
    content: " *";
    color: #d32f2f;
}

.gfcc-form-row input[type="text"],
.gfcc-form-row input[type="email"],
.gfcc-form-row input[type="number"],
.gfcc-form-row input[type="date"],
.gfcc-form-row input[type="url"],
.gfcc-form-row input[type="file"],
.gfcc-form-row textarea,
.gfcc-form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background-color: #fafafa;
}

.gfcc-form-row input:focus,
.gfcc-form-row textarea:focus,
.gfcc-form-row select:focus {
    outline: none;
    border-color: #28C77B;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(40, 199, 123, 0.1);
}

.gfcc-form-row input.error,
.gfcc-form-row textarea.error,
.gfcc-form-row select.error {
    border-color: #d32f2f;
    background-color: #ffebee;
}

.gfcc-form-row textarea {
    resize: vertical;
}

.gfcc-form-row-half {
    display: flex;
    gap: 20px;
}

.gfcc-form-col {
    flex: 1;
}

.char-counter {
    display: inline-block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.error-message {
    display: block;
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
}

/* Form Submit Section */
.gfcc-form-submit {
    text-align: center;
    padding: 30px;
    background: #f8f8f8;
}

.gfcc-submit-button {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    background: #28C77B;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gfcc-submit-button:hover {
    background: #22a968;
}

.gfcc-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Notices and Messages */
.gfcc-notice {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
}

.gfcc-notice p {
    margin: 0 0 10px 0;
}

.gfcc-notice a.button {
    display: inline-block;
    padding: 8px 16px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.gfcc-notice a.button:hover {
    background: #555;
}

.gfcc-notice.gfcc-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.gfcc-notice.gfcc-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.gfcc-notice.gfcc-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.gfcc-notice.gfcc-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #f0ad4e;
}

/* User Campaigns Table */
.gfcc-user-campaigns {
    margin: 20px 0;
}

.gfcc-user-campaigns h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.gfcc-campaigns-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gfcc-campaigns-controls input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

.gfcc-campaigns-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gfcc-campaigns-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gfcc-campaigns-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    font-size: 14px;
}

.gfcc-campaigns-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.gfcc-campaigns-table tbody tr:hover {
    background: #f9f9f9;
}

.gfcc-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.gfcc-status-publish {
    background: #d4edda;
    color: #155724;
}

.gfcc-status-draft {
    background: #fff3cd;
    color: #856404;
}

.gfcc-status-pending {
    background: #cce5ff;
    color: #004085;
}

.gfcc-status-trash {
    background: #f8d7da;
    color: #721c24;
}

.gfcc-campaigns-table .button {
    padding: 4px 12px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    margin-right: 5px;
    transition: background 0.3s ease;
}

.gfcc-campaigns-table .button-small {
    background: #0073aa;
    color: #fff;
    border: 1px solid #0073aa;
}

.gfcc-campaigns-table .button-small:hover {
    background: #005a87;
}

.gfcc-campaigns-table .button-danger {
    background: #dc3545;
    color: #fff;
    border: 1px solid #dc3545;
}

.gfcc-campaigns-table .button-danger:hover {
    background: #c82333;
}

/* Progress Bar */
.gfcc-progress-bar {
    background: #f0f0f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.gfcc-progress-fill {
    background: linear-gradient(90deg, #28C77B, #22a968);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* Campaign Stats */
.gfcc-campaign-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.gfcc-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.gfcc-stat-card .stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #28C77B;
    margin-bottom: 5px;
}

.gfcc-stat-card .stat-label {
    color: #666;
    font-size: 14px;
}

/* Image Preview */
#image-preview {
    margin-top: 10px;
}

#image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.gfcc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(40, 199, 123, 0.3);
    border-radius: 50%;
    border-top-color: #28C77B;
    animation: gfcc-spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .gfcc-form-row-half {
        flex-direction: column;
    }

    .gfcc-campaigns-table {
        font-size: 12px;
    }

    .gfcc-campaigns-table th,
    .gfcc-campaigns-table td {
        padding: 8px;
    }

    .gfcc-campaigns-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .gfcc-campaigns-controls input[type="text"],
    .gfcc-campaigns-controls select {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .gfcc-form-section {
        padding: 15px;
    }

    .gfcc-submit-button {
        width: 100%;
    }

    .gfcc-campaigns-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}