/* DPPBuilder Editor Button Styles */

/* Gutenberg Button */
.dppb-gutenberg-button {
    margin: 0 8px !important;
}

/* Modal Styles */
.dppb-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.dppb-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: dppb-modal-slide-in 0.3s ease-out;
}

@keyframes dppb-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dppb-modal-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dppb-modal-header h3 {
    margin: 0;
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
}

.dppb-modal-close {
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.dppb-modal-close:hover {
    color: #d63638;
}

.dppb-modal-body {
    padding: 25px;
}

.dppb-modal-footer {
    background: #f8f9fa;
    padding: 20px 25px;
    border-top: 1px solid #e1e5e9;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Styles */
.dppb-form-group {
    margin-bottom: 20px;
}

.dppb-form-group:last-child {
    margin-bottom: 0;
}

.dppb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.dppb-form-group input[type="number"],
.dppb-form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s ease;
}

.dppb-form-group input[type="number"]:focus,
.dppb-form-group input[type="text"]:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.dppb-description {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Checkbox Styles */
.dppb-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dppb-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}

.dppb-checkbox input[type="checkbox"] {
    margin: 0 8px 0 0;
    cursor: pointer;
}

.dppb-checkbox span {
    font-size: 14px;
    color: #1d2327;
}

/* Shortcode Preview */
.dppb-shortcode-preview {
    background: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #1d2327;
    word-break: break-all;
    line-height: 1.4;
    min-height: 20px;
}

/* Button Styles */
.dppb-modal-footer .button {
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.dppb-modal-footer .button-secondary {
    background: #f6f7f7;
    border-color: #ddd;
    color: #1d2327;
}

.dppb-modal-footer .button-secondary:hover {
    background: #f0f0f1;
    border-color: #c3c4c7;
}

.dppb-modal-footer .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.dppb-modal-footer .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dppb-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .dppb-modal-header,
    .dppb-modal-body,
    .dppb-modal-footer {
        padding: 15px;
    }
    
    .dppb-modal-footer {
        flex-direction: column;
    }
    
    .dppb-modal-footer .button {
        width: 100%;
        text-align: center;
    }
}

/* WordPress Admin Integration */
.wp-admin .dppb-modal {
    z-index: 100000;
}

/* TinyMCE Integration */
.mce-content-body .dppb-shortcode-preview {
    background: #fff;
    border: 1px solid #ccc;
}

/* Accessibility */
.dppb-modal:focus {
    outline: none;
}

.dppb-modal-content:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Loading State */
.dppb-modal.loading .dppb-modal-content {
    opacity: 0.7;
    pointer-events: none;
}

.dppb-modal.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: dppb-spin 1s linear infinite;
}

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