/**
 * Public Styles for Motivational Words Generator
 */

/* ========================================
   TOOL INTERFACE STYLES
   ======================================== */

/* Tool Container */
.mwg-tool-container {
    max-width: 800px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Tool Title */
.mwg-tool-title {
    text-align: center;
    font-size: 28px;
    margin: 0 0 30px 0;
    color: #333;
    font-weight: 600;
}

/* Filters Section */
.mwg-tool-filters {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.mwg-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.mwg-filter-group {
    display: flex;
    flex-direction: column;
}

.mwg-filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mwg-filter-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mwg-filter-select:hover {
    border-color: #667eea;
    background: #fff;
}

.mwg-filter-select:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tool Actions */
.mwg-tool-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.mwg-generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mwg-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.mwg-generate-btn:active {
    transform: translateY(0);
}

.mwg-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mwg-btn-icon {
    font-size: 22px;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

/* Loading State */
.mwg-tool-loading {
    background: #fff;
    padding: 60px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.mwg-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mwg-tool-loading p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Result Display */
.mwg-tool-result {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 2px solid #667eea30;
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mwg-result-content {
    text-align: center;
    margin-bottom: 25px;
}

.mwg-result-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.mwg-result-text {
    font-size: 22px;
    line-height: 1.6;
    color: #333;
    font-weight: 500;
    padding: 0 20px;
}

/* Result Actions */
.mwg-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.mwg-action-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.mwg-action-btn * {
    pointer-events: none;
}

.mwg-action-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: #fff !important;
    transform: translateY(-2px);
    text-decoration: none;
}

.mwg-action-btn:active {
    transform: translateY(0);
}

.mwg-action-btn span {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
}

/* Ensure text is visible */
.mwg-action-btn:not(:empty)::after {
    content: none;
}

.mwg-regenerate-btn,
.mwg-copy-btn,
.mwg-favorite-btn,
.mwg-share-btn {
    min-width: 120px;
    justify-content: center;
}

.mwg-action-btn.mwg-favorite-btn.is-favorite {
    background: #ffd700;
    border-color: #ffd700;
}

/* Result Meta */
.mwg-result-meta {
    text-align: center;
    font-size: 13px;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* History Section */
.mwg-tool-history,
.mwg-tool-favorites {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-top: 25px;
}

.mwg-tool-history h4,
.mwg-tool-favorites h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.mwg-history-list,
.mwg-favorites-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mwg-history-item,
.mwg-favorite-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    font-size: 14px;
    color: #555;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mwg-history-item:hover,
.mwg-favorite-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.mwg-history-item .mwg-item-meta,
.mwg-favorite-item .mwg-item-meta {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.mwg-history-item .mwg-item-meta span,
.mwg-favorite-item .mwg-item-meta span {
    background: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.mwg-favorite-item .mwg-remove-favorite {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #ff4444;
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   SIMPLE MODE STYLES (Original)
   ======================================== */

/* Wrapper */
.mwg-wrapper {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Styles */
.mwg-style-default {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
}

.mwg-style-card {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: none;
}

.mwg-style-minimal {
    background: transparent;
    border: none;
    padding: 10px 0;
}

.mwg-style-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.mwg-style-bordered {
    background: #fafafa;
    border-left: 4px solid #667eea;
    border-radius: 0;
}

/* Icon */
.mwg-icon {
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
}

/* Content */
.mwg-content {
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 15px;
    color: inherit;
}

.mwg-wrapper.mwg-font-small .mwg-content { font-size: 16px; }
.mwg-wrapper.mwg-font-medium .mwg-content { font-size: 18px; }
.mwg-wrapper.mwg-font-large .mwg-content { font-size: 22px; }
.mwg-wrapper.mwg-font-extra-large .mwg-content { font-size: 26px; }

/* Meta */
.mwg-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.mwg-author {
    font-size: 14px;
    font-style: italic;
    opacity: 0.7;
}

/* Refresh Button */
.mwg-refresh-btn {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.mwg-refresh-btn:hover {
    background: #5568d3;
}

.mwg-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Share Buttons */
.mwg-share-buttons {
    display: flex;
    gap: 8px;
}

.mwg-share-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.2s ease;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
}

.mwg-share-btn:hover {
    transform: scale(1.1);
}

/* Attribution */
.mwg-attribution {
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
    margin-top: 10px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mwg-animation-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.mwg-animation-slide-up {
    animation: slideUp 0.6s ease-out;
}

/* Loading State */
.mwg-loading .mwg-content {
    opacity: 0.5;
    position: relative;
}

.mwg-loading .mwg-content:after {
    content: '⏳';
    display: inline-block;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .mwg-wrapper {
        padding: 15px;
    }
    
    .mwg-content {
        font-size: 16px;
    }
    
    .mwg-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Responsive Design for Tool */
@media (max-width: 768px) {
    .mwg-tool-container {
        margin: 20px 15px;
    }
    
    .mwg-tool-title {
        font-size: 22px;
    }
    
    .mwg-tool-filters {
        padding: 20px 15px;
    }
    
    .mwg-filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mwg-generate-btn {
        width: 100%;
        justify-content: center;
    }
    
    .mwg-result-text {
        font-size: 18px;
    }
    
    .mwg-result-actions {
        flex-direction: column;
    }
    
    .mwg-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Toast Notifications */
.mwg-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    animation: toastIn 0.3s ease-out;
}

.mwg-toast.success {
    background: #46b450;
}

.mwg-toast.error {
    background: #dc3232;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State */
.mwg-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.mwg-empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Force button text visibility - override theme styles */
.mwg-action-btn {
    font-size: 14px !important;
    color: #333 !important;
    text-indent: 0 !important;
    overflow: visible !important;
}

.mwg-action-btn:hover {
    color: #fff !important;
}

.mwg-result-actions button,
.mwg-result-actions .mwg-action-btn {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-flex !important;
}

/* Ensure button content is visible */
.mwg-action-btn > * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix for themes that hide button text */
button.mwg-action-btn::before,
button.mwg-action-btn::after {
    content: none !important;
}

/* Generate button text fix */
.mwg-btn-text {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 18px !important;
    color: inherit !important;
}

.mwg-generate-btn {
    text-indent: 0 !important;
    font-size: 18px !important;
}

.mwg-generate-btn .mwg-btn-text {
    font-size: 18px !important;
}
