/**
 * Admin styles for Yessopress
 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background: #f8f9fa;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --accent-color: #f97316;
    --transition-speed: 0.3s;
}

.yessopress-container {
    margin: 20px 0;
    background: #27292b;
    padding: 10px 0;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.yessopress-flex-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    background: #1a1c1e;
    padding: 20px 40px;
    color: #c0c0c0;
}

.yessopress-flex-container h2{
    color: #c0c0c0;
}

.yessopress-left-panel {
    width: 30%;
    flex-shrink: 0;
}

.yessopress-right-panel {
    width: 70%;
    flex-shrink: 0;
    position: relative;
}

/* Generator Page Styles */
.yessopress-form-container {
    background: transparent;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.yessopress-form-group {
    margin-bottom: 1.5rem;
}

.yessopress-label-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #fff;
}

#yessopress-theme {
    background-color: #27292b;
    color: #c0c0c0;
    width: 100%;
    padding: 1rem;
    border: 2px solid #27292b;
    border-radius: 8px;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    transition: all var(--transition-speed);
}

#yessopress-theme:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
    outline: none;
}

.yessopress-placeholder-message {
    text-align: center;
    padding: 3rem;
    background: #272727;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #ffffff10;
    position: absolute;
    margin: auto;
    top: 50px;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    width: 80%;
}

.yessopress-placeholder-message i {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
    background-image: linear-gradient(101deg, #e02b20 0%, #ed7732 43%, #fcca46 100%);
    padding: 15px;
    border-radius: 10px;
}

.yessopress-placeholder-message h2 {
    color: #c0c0c0;
    font-weight: bold;
    font-size: 2.25rem;
    line-height: 2.5rem;
    margin: 1rem 0;
    font-size: 1.8rem;
}

.yessopress-placeholder-message p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Typing effect cursor */
#yessopress-theme::placeholder {
    opacity: 0.7;
}

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

#yessopress-theme::after {
    content: '|';
    animation: blink 1s infinite;
}


.yessopress-dual-fields {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.yessopress-half-width {
    width: 50%;
}

select.yessopress-with-flag,
select.yessopress-with-icon {
    background-color: #27292b;
    color: #c0c0c0;
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #27292b;
    border-radius: 8px;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%232c3e50' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    transition: all var(--transition-speed);
}

select.yessopress-with-flag:focus,
select.yessopress-with-icon:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

button.yessopress-button {
    background-image: linear-gradient(101deg, #e02b20 0%, #ed7732 43%, #fcca46 100%);
    width: 100%;
    padding: 1.2rem;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

button.yessopress-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52,152,219,0.3);
}

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

/* Progress Styles */
.yessopress-progress-container {
    margin-bottom: 3rem;
}

.yessopress-progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.yessopress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.yessopress-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e6eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-speed);
}

.yessopress-step-icon.processing {
    background: var(--secondary-color);
    animation: pulse 1.5s infinite;
}

.yessopress-step-icon.complete {
    background: var(--success-color);
}

.yessopress-step-line {
    width: 100px;
    height: 2px;
    background: #e0e6eb;
    margin: 0 1rem;
}

.yessopress-progress-bar {
    height: 6px;
    background: #e0e6eb;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 400px;
}

.yessopress-progress-fill {
    height: 100%;
    width: 0;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

/* Results Grid Styles */
.yessopress-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.yessopress-publication-card {
    padding: 0px;
    background: #27292b;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.yessopress-publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.yessopress-publication-image-container {
    position: relative;
    margin-bottom: 1rem;
}

.yessopress-publication-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.yessopress-image-source-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.yessopress-publication-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
}

.yessopress-hashtags {
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.yessopress-publication-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
}

.yessopress-action-btn {
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    background: #f0f2f5;
    border: 1px solid #ddd;
    font-size: 0.9em;
}

.yessopress-action-btn:hover {
    transform: translateY(-2px);
}

.yessopress-copy-btn { color: #2c3e50; }
.yessopress-copy-btn:hover { background: #e8f4ff; }

.yessopress-feedback-stats {
    display: flex;
    gap: 10px;
}

.yessopress-like-count, 
.yessopress-dislike-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.yessopress-like-count { color: var(--success-color); }
.yessopress-dislike-count { color: var(--error-color); }

/* Loading Indicator */
.yessopress-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    grid-column: 1 / -1;
}

.yessopress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* History Page Styles */
.yessopress-empty-history {
    text-align: center;
    padding: 3rem;
}

.yessopress-history-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.yessopress-history-item {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.yessopress-history-header {
    background-color: #f4f7f9;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.yessopress-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9em;
}

.yessopress-history-publications {
    padding: 1.5rem;
}

.yessopress-publications-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.yessopress-no-publications {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Settings Page Styles */
.yessopress-settings-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.yessopress-settings-help {
    background: white;
    padding: 2rem;
    border-radius: 12px;
}

.yessopress-settings-help-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.yessopress-settings-help-section {
    padding: 1.5rem;
    background: #f4f7f9;
    border-radius: 8px;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

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

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .yessopress-results,
    .yessopress-publications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .yessopress-flex-container {
        flex-direction: column;
    }
    .yessopress-left-panel, .yessopress-right-panel {
        width: 100%;
    }
    
    .yessopress-placeholder-message{
        position: relative;
        height: auto;
        width: auto;
    }
}

@media (max-width: 768px) {
    .yessopress-dual-fields {
        flex-direction: column;
    }
    
    .yessopress-half-width {
        width: 100%;
    }
    
    .yessopress-results,
    .yessopress-publications-grid {
        grid-template-columns: 1fr;
    }
    
    .yessopress-step-line {
        width: 50px;
    }
    
    .yessopress-container {
        padding: 1.5rem;
    }
}