/* Custom Title Section */
.honghot-custom-title-section {
    padding: 0;
}

.honghot-custom-title-section h3 {
    margin-top: 0;
    color: #000000;
    font-size: 16px;
    font-weight: 600;
}

.honghot-custom-title-input input {
    font-size: 20px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

.honghot-custom-title-input input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

.honghot-custom-title-input .description {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* Blocks Container */
.honghot-blocks-container {
    margin: 20px 0;
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-sizing: border-box;
}

.honghot-blocks-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

/* Block Item */
.honghot-block {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.honghot-block:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #999;
}

.honghot-block-header {
    background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
    box-sizing: border-box;
}

.honghot-block-type {
    font-weight: bold;
    font-size: 15px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.honghot-block-type small {
    font-weight: normal;
    color: #ff6b6b;
    font-size: 12px;
    margin-left: 10px;
    text-transform: none;
}

.honghot-block-actions {
    display: flex;
    gap: 5px;
}

.honghot-block-actions .button {
    min-width: 35px;
    text-align: center;
    padding: 2px 10px;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.honghot-block-actions .button:hover {
    background: #f5f5f5;
    border-color: #999;
}

.honghot-block-actions .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.honghot-block-content {
    padding: 20px;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
}

.honghot-block-content label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
}

.honghot-block-content textarea,
.honghot-block-content input[type="text"] {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    width: 100%;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.honghot-block-content textarea:focus,
.honghot-block-content input[type="text"]:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

/* Add Block Buttons */
.honghot-add-block {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    box-sizing: border-box;
}

.honghot-add-block .button {
    flex: 1;
    text-align: center;
    min-width: 180px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.honghot-add-block .button-primary {
    background: #007cba;
    border-color: #007cba;
}

.honghot-add-block .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,124,186,0.3);
}

/* Video Block */
.honghot-video-block .description {
    margin: 10px 0 15px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.honghot-select-videos {
    margin-top: 10px !important;
}

/* Paragraph Block */
.honghot-paragraph-block textarea {
    min-height: 120px;
    resize: vertical;
}

/* Gallery Block */
.honghot-gallery-block input[readonly] {
    background-color: #f9f9f9;
    cursor: default;
    box-sizing: border-box;
}

.honghot-gallery-preview {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    box-sizing: border-box;
}

.honghot-preview-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 6px;
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.honghot-preview-image:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: #007cba;
}

/* Responsive */
@media (max-width: 768px) {
    .honghot-add-block {
        flex-direction: column;
        gap: 10px;
    }
    
    .honghot-add-block .button {
        width: 100%;
    }
    
    .honghot-block-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .honghot-block-actions {
        width: 100%;
        justify-content: center;
    }
    
    .honghot-custom-title-input input {
        font-size: 16px;
    }
}

/* Loading State */
.honghot-block.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.honghot-block.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error State */
.honghot-block.error {
    border-color: #dc3232;
}

.honghot-block.error .honghot-block-header {
    background: #fbeaea;
    border-bottom-color: #dc3232;
    color: #dc3232;
}

/* Success State */
.honghot-block.success {
    border-color: #46b450;
}

.honghot-block.success .honghot-block-header {
    background: #ecf7ed;
    border-bottom-color: #46b450;
    color: #46b450;
}

/* Animation for new blocks */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.honghot-block:last-of-type {
    animation: slideIn 0.3s ease-out;
}

/* Image Link Block - Multiple Images */
.honghot-imagelink-block textarea {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    width: 100%;
    transition: border-color 0.3s ease;
    font-family: monospace;
    box-sizing: border-box;
}

.honghot-imagelink-block textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

.honghot-imagelink-block .description {
    margin: 10px 0 15px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.honghot-imagelink-preview {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    box-sizing: border-box;
}

.imagelink-preview-item {
    width: 100%;
    text-align: center;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-sizing: border-box;
}

.honghot-preview-image-link {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 6px;
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.honghot-preview-image-link:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: #007cba;
}