/* Publia SEO Generator - Frontend Styles */

.psg-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.psg-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.psg-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

/* Steps */
.psg-steps-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

@media (max-width: 968px) {
    .psg-steps-row {
        grid-template-columns: 1fr;
    }
}

.psg-step {
    margin-bottom: 0;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #ddd;
    opacity: 0.6;
    transition: all 0.3s ease;
    height: 100%;
}

.psg-step-3 {
    margin-bottom: 30px;
}

.psg-step.active {
    opacity: 1;
    border-left-color: #0073aa;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.psg-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.psg-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    font-size: 18px;
    margin-right: 15px;
}

.psg-step:not(.active) .psg-step-number {
    background: #ccc;
}

.psg-step-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.psg-step-content {
    padding-left: 51px;
}

.psg-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Input Group */
.psg-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.psg-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.psg-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Keywords Grid */
.psg-keywords-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .psg-keywords-grid {
        grid-template-columns: 1fr;
    }
}

.psg-keyword-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.psg-keyword-field label .required {
    color: #d63638;
}

/* Buttons */
.psg-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.psg-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.psg-btn-primary {
    background: #0073aa;
    color: #fff;
}

.psg-btn-primary:hover:not(:disabled) {
    background: #005a87;
}

.psg-btn-success {
    background: #00a32a;
    color: #fff;
}

.psg-btn-success:hover:not(:disabled) {
    background: #008a20;
}

.psg-btn-secondary {
    background: #2271b1;
    color: #fff;
}

.psg-btn-secondary:hover:not(:disabled) {
    background: #135e96;
}

.psg-btn-link {
    background: transparent;
    color: #0073aa;
    padding: 12px 16px;
}

.psg-btn-link:hover {
    text-decoration: underline;
}

.psg-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.psg-btn-block {
    display: block;
    width: 100%;
}

/* SEO Score Section */
.psg-seo-score {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px;
}

.psg-score-gauge {
    position: relative;
    width: 200px;
    height: 120px;
    margin: 0 auto 20px;
}

.psg-gauge-svg {
    width: 100%;
    height: 100%;
}

.psg-gauge-bg,
.psg-gauge-fill {
    transition: all 0.6s ease;
}

.psg-score-value {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.psg-score-number {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.psg-score-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

.psg-score-icon {
    width: 32px;
    height: 32px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.psg-score-text {
    flex: 1;
}

.psg-score-text strong {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.psg-score-text p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.psg-score-metrics {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.psg-metric {
    display: grid;
    grid-template-columns: 24px 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.psg-metric:last-child {
    border-bottom: none;
}

.psg-metric-icon {
    font-size: 16px;
    text-align: center;
}

.psg-metric-label {
    font-size: 13px;
    color: #666;
}

.psg-metric-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: right;
}

.psg-metric-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    font-size: 8px;
    text-align: center;
    line-height: 12px;
}

.psg-metric-badge.great {
    color: #4caf50;
}

.psg-metric-badge.good {
    color: #ffc107;
}

.psg-metric-badge.poor {
    color: #ff9800;
}

/* Loading */
.psg-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f0f6fc;
    border-radius: 4px;
    margin-top: 15px;
}

.psg-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: psg-spin 1s linear infinite;
}

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

.psg-loading-text {
    color: #0073aa;
    font-weight: 500;
}

/* Messages */
.psg-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 15px;
    display: none;
}

.psg-message.success {
    background: #edfaef;
    color: #00a32a;
    border-left: 4px solid #00a32a;
}

.psg-message.error {
    background: #fcf0f1;
    color: #d63638;
    border-left: 4px solid #d63638;
}

/* Output */
.psg-output-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .psg-output-layout {
        grid-template-columns: 1fr;
    }
}

.psg-output-main {
    min-width: 0;
}

.psg-output-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.psg-output-wrapper {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.psg-output-preview {
    padding: 30px;
    background: #fff;
    min-height: 200px;
    transition: all 0.3s ease;
}

.psg-output-preview.editing {
    border: 2px solid #0073aa;
    background: #f9fcff;
    outline: none;
}

.psg-output-preview:focus {
    outline: none;
}

.psg-output-preview h1 {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-transform: none;
}

.psg-output-preview h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #444;
    text-transform: none;
}

.psg-output-preview h3 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 12px;
    color: #555;
    text-transform: none;
}

.psg-output-preview p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #666;
}

.psg-output-preview ul {
    margin: 15px 0;
    padding-left: 25px;
}

.psg-output-preview li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #333;
}

.psg-output-preview strong {
    color: #333;
}

.psg-output-html {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    border: none;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #f9f9f9;
    resize: vertical;
    display: none;
}

.psg-output-html:focus {
    outline: none;
}

/* Sidebar */
.psg-output-sidebar {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
}

.psg-sidebar-section {
    margin-bottom: 25px;
}

.psg-sidebar-section:last-child {
    margin-bottom: 0;
}

.psg-sidebar-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.psg-sidebar-field {
    margin-bottom: 15px;
}

.psg-sidebar-field:last-child {
    margin-bottom: 0;
}

.psg-sidebar-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.psg-sidebar-field .psg-input,
.psg-sidebar-field .psg-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.psg-sidebar-field .psg-textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.psg-char-count {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
    text-align: right;
}

.psg-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.psg-info-row:last-child {
    border-bottom: none;
}

.psg-info-label {
    font-size: 13px;
    color: #666;
}

.psg-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Image Generation */
.psg-image-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.psg-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.psg-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.psg-btn-block {
    display: block;
    width: 100%;
}

.psg-image-preview {
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.psg-image-preview img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.psg-image-preview img:hover {
    opacity: 0.9;
}
