/**
 * Luna SEO Writer Styles
 * Styles for the SEO blog writer shortcode
 */

#aiWirterBlogArticle {max-width: var(--wp--style--global--content-size) !important;margin: 0 auto !important;}
:root :where(.is-layout-constrained) > * {margin-block-start: 0 !important;}
.page-id-289 h1.page-title-replace {margin-bottom: 1.55rem;font-size: 3rem;}
.page-id-289 .entry-content img {
  margin: 0;
  border: none;
  box-shadow: none;
}
.luna-seo-writer-container {
  margin-top: 30px !important;
}

#aiWirterBlogArticle h2, #aiWirterBlogArticle h3 {
  line-height: 1.5;
}

#aiWirterBlogArticle h4, #aiWirterBlogArticle h5, #aiWirterBlogArticle h6 {
  line-height: 1.35;
}

.luna-seo-writer-container {
  max-width: 1080px !important;
  margin: 40px auto;
  background: rgba(0,0,0,.2);
  border-radius: 8px;
  backdrop-filter: blur(21px);
  overflow: hidden;
  font-family: var(--wp--preset--font-family--helvetica-now-display);
  border: 1px solid var(--wp--preset--color--background);
}

/* Header */
.luna-seo-writer-header {
  background: transparent;
  color: #f1f1f1;
  padding: 40px 30px;
  text-align: center;
  background-color: var(--wp--preset--color--background);
  background-size: cover;
  display:none;
}

.luna-seo-writer-header-content {
    max-width: 700px;
    margin: 0 auto;
    display: none;
}

.page-id-289 .entry-content.wp-block-post-content.is-layout-flow.wp-block-post-content-is-layout-flow {
  max-width: 1280px !important;
}

.luna-seo-writer-title, h1.page-title-replace {
    font-size: 4rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.luna-seo-writer-subtitle {
    font-size: 1.35rem;
    margin: 0;
    opacity: 0.95;
    font-weight: 400;
    color: #a6a6b1;
}

/* Content Area */
.luna-seo-writer-content {
    padding: 30px;
}

/* Input Section */
.luna-seo-writer-input-section {
    margin-bottom: 30px;
}

.luna-seo-writer-input-wrapper {
    max-width: 100%;
}

.luna-seo-writer-label {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #f1f1f1;
    margin-bottom: 12px;
    text-align:left;
}

.luna-seo-writer-input-group input {
    border: 1px solid #f1f1f1 !important;
    border-radius: 0 !important;
  }

.luna-seo-writer-input-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.luna-seo-writer-keyword-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid #f1f1f1;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
    background: #f1f1f1 !important;
    color: var(--wp--preset--color--background) !important;
}

.luna-seo-writer-keyword-input::placeholder {
    color: rgba(0, 0, 0, 0.65);
}

.luna-seo-writer-keyword-input:focus {
    outline: none;
    border-color: #f1f1f1;
    box-shadow: 0 0 0 3px rgba(255, 244, 233, 0.1);
}

.luna-seo-writer-generate-btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #f1f1f1;
    background: #724fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.luna-seo-writer-generate-btn:hover:not(:disabled) {
    background: var(--wp--preset--color--background);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 244, 233, 0.3);
}

.luna-seo-writer-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.luna-seo-writer-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.luna-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 244, 233, 0.3);
    border-top-color: #f1f1f1;
    border-radius: 50%;
    animation: luna-spin 0.8s linear infinite;
}
.blog-writer-header .luna-seo-writer-article-content h1 {
    font-size:auto !important;
}
@keyframes luna-spin {
    to { transform: rotate(360deg); }
}

/* Options Section */
.luna-seo-writer-options {
    margin: 25px 0 0;
    overflow: hidden;
}

.luna-seo-writer-options-toggle {
  width: 100%;
  padding: 15px 0;
  background: transparent;
  border-top: 1px solid var(--wp--preset--color--background);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #f1f1f1;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  font-family: inherit;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.luna-seo-writer-options-arrow {
    transition: transform 0.2s;
    font-size: 12px;
}

.luna-seo-writer-options-arrow.rotated {
    transform: rotate(180deg);
}

.luna-seo-writer-options-content {
    padding: 0 0;
    background: transparent;
}

.luna-seo-writer-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.luna-seo-writer-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.luna-seo-writer-option label {
    font-size: 14px;
    font-weight: 600;
    color: #f1f1f1;
    text-align:left;
}

.luna-seo-writer-select {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #f1f1f1;
    border-radius: 0;
    background: #f1f1f1;
    color: var(--wp--preset--color--background);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.luna-seo-writer-select option {
    background: #1e191a;
    color: #f1f1f1;
}

.luna-seo-writer-select:focus {
    outline: none;
    border-color: #f1f1f1;
}

/* Results Section */
.luna-seo-writer-results {
    margin-top: 30px;
    border: 1px solid #2e2c2a;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.luna-seo-writer-results-header {
    padding: 20px;
    background: transparent;
    border-bottom: 1px solid #2e2c2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.luna-seo-writer-results-header h3 {
    margin: 0;
    font-size: 20px;
    color: #f1f1f1;
    font-weight:700;
}

.luna-seo-writer-results-actions {
    display: flex;
    gap: 10px;
}

.luna-seo-writer-copy-btn,
.luna-seo-writer-clear-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #2e2c2a;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.luna-seo-writer-copy-btn {
    color: #f1f1f1;
    border-color: #2e2c2a;
    display: flex;
    gap: 7px;
}

.luna-seo-writer-copy-btn img {
  width: 14px;
}

.luna-seo-writer-copy-btn:hover img {
  filter: invert();
}

.luna-seo-writer-copy-btn:hover {
    background: #f1f1f1;
    color: var(--wp--preset--color--background);
    border-color: #f1f1f1;
}

.luna-seo-writer-clear-btn {
    color: #f1f1f1;
    border-color: #2e2c2a;
}

.luna-seo-writer-clear-btn:hover {
    background: rgba(255, 244, 233, 0.1);
    border-color: #f1f1f1;
}

.luna-seo-writer-article-content {
    padding: 30px;
    line-height: 1.8;
    color: #f1f1f1;
    max-height: 600px;
    overflow-y: auto;
    background: transparent;
    text-align:left;
}

.luna-seo-writer-article-content h1,
.luna-seo-writer-article-content h2,
.luna-seo-writer-article-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #f1f1f1;
    font-weight: 700;
}

.luna-seo-writer-article-content h1 {
    font-size: 32px;
    margin-top:0;
}

.luna-seo-writer-article-content h2 {
    font-size: 24px;
}

.luna-seo-writer-article-content h3 {
    font-size: 20px;
}

.luna-seo-writer-article-content p {
    margin-bottom: 15px;
}

.luna-seo-writer-article-content strong {
    font-weight: 600;
    color: #f1f1f1;
}

/* Chat Interface */
.luna-seo-writer-chat {
    margin-top: 20px;
    border: 1px solid #2e2c2a;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.luna-seo-writer-chat-header {
    padding: 15px 20px;
    background: transparent;
    border-bottom: 1px solid #2e2c2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.luna-seo-writer-chat-header h3 {
    margin: 0;
    font-size: 16px;
    color: #f1f1f1;
}

.luna-seo-writer-chat-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #f1f1f1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.luna-seo-writer-chat-close:hover {
    background: rgba(255, 244, 233, 0.1);
}

.luna-seo-writer-chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: transparent;
}

.luna-seo-writer-chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.luna-seo-writer-chat-message-user {
    align-items: flex-end;
}

.luna-seo-writer-chat-message-luna {
    align-items: flex-start;
}

.luna-seo-writer-chat-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    word-wrap: break-word;
}

.luna-seo-writer-chat-message-user .luna-seo-writer-chat-message-content {
    background: #f1f1f1;
    color: var(--wp--preset--color--background);
    border-bottom-right-radius: 4px;
}

.luna-seo-writer-chat-message-luna .luna-seo-writer-chat-message-content {
    background: rgba(255, 244, 233, 0.1);
    color: #f1f1f1;
    border: 1px solid #2e2c2a;
    border-bottom-left-radius: 4px;
}

.luna-seo-writer-chat-message-time {
    font-size: 11px;
    color: rgba(255, 244, 233, 0.6);
    margin-top: 4px;
    padding: 0 4px;
}

.luna-seo-writer-chat-input-area {
    padding: 15px;
    background: transparent;
    border-top: 1px solid #2e2c2a;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.luna-seo-writer-chat-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #2e2c2a;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s;
    background: transparent;
    color: #f1f1f1;
}

.luna-seo-writer-chat-input::placeholder {
    color: rgba(255, 244, 233, 0.5);
}

.luna-seo-writer-chat-input:focus {
    outline: none;
    border-color: #f1f1f1;
}

.luna-seo-writer-chat-send {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wp--preset--color--background);
    background: #f1f1f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.luna-seo-writer-chat-send:hover:not(:disabled) {
    background: #e5d9c8;
}

.luna-seo-writer-chat-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Typing Indicator */
.luna-typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.luna-typing-dots span {
    width: 8px;
    height: 8px;
    background: #f1f1f1;
    border-radius: 50%;
    animation: luna-typing 1.4s infinite;
}

.luna-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.luna-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes luna-typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Info Section */
.luna-seo-writer-info {
  margin-top: 25px;
  padding: 15px 20px;
  background: transparent;
  border: 1px solid #2e2c2a;
  border-radius: 8px;
  color: #f1f1f1;
  font-size: 14px;
  line-height: 1.6;
}

.luna-seo-writer-info p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .luna-seo-writer-container {
        margin: 20px 10px;
        border-radius: 8px;
    }
    
    .luna-seo-writer-header {
        padding: 30px 20px;
    }
    
    .luna-seo-writer-title {
        font-size: 24px;
    }
    
    .luna-seo-writer-content {
        padding: 20px;
    }
    
    .luna-seo-writer-input-group {
        flex-direction: column;
    }
    
    .luna-seo-writer-keyword-input {
        min-width: 100%;
    }
    
    .luna-seo-writer-generate-btn {
        width: 100%;
        justify-content: center;
    }
    
    .luna-seo-writer-options-grid {
        grid-template-columns: 1fr;
    }
    
    .luna-seo-writer-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .luna-seo-writer-results-actions {
        width: 100%;
    }
    
    .luna-seo-writer-copy-btn,
    .luna-seo-writer-clear-btn {
        flex: 1;
    }
    
    .luna-seo-writer-article-content {
        padding: 20px;
        max-height: 400px;
    }
    
    .luna-seo-writer-chat-message-content {
        max-width: 85%;
    }
}

