/* LP Simple Blog Publisher Styles */

.lp-blog-publisher {
    max-width: 800px;
    margin: 120px auto 200px auto; /* 120px top to clear nav, 200px bottom for footer */
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    clear: both;
    isolation: isolate; /* Creates new stacking context */
    min-height: 800px; /* Ensure container is tall enough */
}

.lp-blog-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 2;
}

.lp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 3;
}

.lp-form-group label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.lp-form-group input[type="text"],
.lp-form-group textarea,
.lp-form-group select {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s;
    position: relative;
    z-index: 5;
    background: #ffffff;
}

.lp-form-group input[type="text"]:focus,
.lp-form-group textarea:focus,
.lp-form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    z-index: 10;
}

.lp-form-group textarea {
    resize: vertical;
    min-height: 300px;
    line-height: 1.6;
}

.lp-form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
    position: relative;
    z-index: 5;
}

.lp-form-group small {
    color: #666;
    font-size: 14px;
}

/* Editor Toolbar */
.lp-editor-toolbar {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
}

.lp-format-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    min-width: 40px;
}

.lp-format-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

.lp-format-btn:active {
    background: #d0d0d0;
    transform: translateY(1px);
}

.lp-form-group textarea {
    border-radius: 0 0 4px 4px;
    border-top: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.lp-form-actions {
    margin-top: 10px;
    position: relative;
    z-index: 10;
}

.lp-btn-primary {
    background: #4CAF50;
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
    z-index: 100;
}

.lp-btn-primary:hover {
    background: #45a049;
}

.lp-btn-primary:active {
    background: #3d8b40;
}

/* Success and Error Messages */
.lp-blog-message {
    max-width: 600px;
    margin: 120px auto 200px auto; /* Match main form spacing to push footer down */
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    min-height: 400px; /* Ensure enough height to push footer */
}

.lp-blog-success {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
}

.lp-blog-error {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
}

.lp-blog-message h3 {
    margin-top: 0;
    font-size: 24px;
}

.lp-blog-message p {
    font-size: 16px;
    line-height: 1.6;
}

.lp-blog-message a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lp-blog-publisher {
        margin: 20px;
        padding: 20px;
    }

    .lp-form-group input[type="text"],
    .lp-form-group textarea,
    .lp-form-group select {
        font-size: 16px; /* Prevents iOS zoom */
    }

    .lp-btn-primary {
        width: 100%;
        padding: 15px;
    }
}
