/* Ideas Board Plugin - Public Styles */

/* General Styles */
.ideas-board-form-container,
.ideas-board-list,
.ideas-board-count-widget,
.ideas-board-latest,
.ideas-board-top-rated {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
}

/* Form Styles */
.ideas-board-form-container {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2);
    color: white;
}

.ideas-form-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ideas-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: white;
    font-size: 1.1em;
}

.form-group input[type="text"],
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    background: rgba(255,255,255,0.9);
    color: #374151;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
    transform: translateY(-2px);
}

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

.form-group textarea.error {
    border: 2px solid #ef4444;
}

.char-counter {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: rgba(255,255,255,0.8);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9em;
}

.submit-idea-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    min-width: 200px;
}

.submit-idea-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Ideas Grid Styles */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.idea-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.15);
}

.idea-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.idea-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.idea-card:hover .idea-thumbnail img {
    transform: scale(1.05);
}

.file-attachment {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    flex-direction: column;
    gap: 10px;
}

.file-attachment i {
    font-size: 3em;
}

.idea-content {
    padding: 20px;
}

.idea-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    line-height: 1.4;
}

.idea-title a {
    color: #1e3a8a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.idea-title a:hover {
    color: #3b82f6;
}

.idea-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
}

.idea-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #6b7280;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f3f4f6;
}

/* Rating Styles */
.idea-rating-display {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
}

.stars-display {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
    justify-content: center;
}

.star {
    color: #e5e7eb;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.star.filled {
    color: #f59e0b;
    text-shadow: 0 1px 3px rgba(245, 158, 11, 0.5);
}

.rating-text {
    text-align: center;
    font-weight: bold;
    color: #374151;
}

.idea-rating-form {
    margin-top: 15px;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 10px;
    text-align: center;
}

.idea-rating-form p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #374151;
}

.stars-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.star-rating {
    color: #e5e7eb;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.star-rating:hover,
.star-rating.hover {
    color: #f59e0b;
    transform: scale(1.1);
}

.rating-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
}

.rating-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.rating-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Action Buttons */
.idea-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.read-more-btn {
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
}

.read-more-btn:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
}

.social-share {
    display: flex;
    gap: 10px;
}

.share-whatsapp,
.share-facebook {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.share-whatsapp {
    background: #10b981;
    color: white;
}

.share-facebook {
    background: #3b82f6;
    color: white;
}

.share-whatsapp:hover,
.share-facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Pagination */
.ideas-pagination {
    text-align: center;
    margin: 30px 0;
}

.ideas-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #f9fafb;
    color: #3b82f6;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.ideas-pagination .page-numbers:hover,
.ideas-pagination .page-numbers.current {
    background: #3b82f6;
    color: white;
}

/* No Ideas Found */
.no-ideas-found {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

.no-ideas-found p {
    font-size: 1.2em;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ideas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .idea-card {
        margin: 0 10px;
    }
    
    .idea-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .social-share {
        justify-content: center;
    }
    
    .idea-meta {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .stars-rating {
        gap: 8px;
    }
    
    .star-rating {
        font-size: 1.8em;
    }
    
    .ideas-board-form-container {
        margin: 10px;
        padding: 20px;
    }
    
    .form-group input[type="text"],
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .ideas-form-title {
        font-size: 1.5em;
    }
    
    .submit-idea-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    .star-rating {
        font-size: 1.5em;
    }
    
    .idea-title {
        font-size: 1.2em;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.star-rating:focus,
.submit-idea-btn:focus,
.read-more-btn:focus,
.share-whatsapp:focus,
.share-facebook:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .idea-card {
        border: 2px solid #000;
    }
    
    .star.filled {
        color: #000;
    }
    
    .star-rating:hover {
        color: #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

